@ozdao/prometheus-framework 0.2.253 → 0.2.255
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/chats.server.js +110 -0
- package/dist/chats.server.mjs +111 -0
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +12 -3
- package/dist/files.server.mjs +12 -3
- package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.cjs +450 -0
- package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.cjs.map +1 -0
- package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.js +450 -0
- package/dist/prometheus-framework/src/components/SelectMulti/SelectMulti.vue2.js.map +1 -0
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/partials/Sidebar.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.cjs.map +1 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js +31 -0
- package/dist/prometheus-framework/src/modules/chats/chats.client.js.map +1 -0
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/sections/HotPosts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEventTickets.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/blocks/BlockFilter.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/views/components/partials/Header.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/landing/components/sections/SectionGuide.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/pages/OrderCreateBackoffice.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormAddCustomer.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormCustomerDetails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/sections/FormPayment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/CardDepartment.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Department.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/pages/pages.client.cjs +643 -643
- package/dist/prometheus-framework/src/modules/pages/pages.client.js +643 -643
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/pages/views/components/partials/SidebarPages.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs +3 -2
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js +4 -3
- package/dist/prometheus-framework/src/modules/products/components/layouts/Marketplace.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs +7 -5
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js +7 -5
- package/dist/prometheus-framework/src/modules/products/components/pages/Catalog.vue.js.map +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/CategoryEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/EditLeftover.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/Filters.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs +21 -2
- package/dist/prometheus-framework/src/modules/reports/reports.client.cjs.map +1 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js +20 -1
- package/dist/prometheus-framework/src/modules/reports/reports.client.js.map +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/Spot.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/spots/components/pages/SpotEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/wallet/views/components/pages/Wallet.vue.js +2 -2
- package/dist/reports.server.js +21 -8
- package/dist/reports.server.mjs +21 -8
- package/dist/tickets.controller-A_1G-2vC.js +438 -0
- package/dist/tickets.controller-C6UL9C5M.mjs +439 -0
- package/dist/wallet.server.js +1 -1
- package/dist/wallet.server.mjs +1 -1
- package/package.json +9 -1
- package/src/modules/chats/chats.client.js +48 -0
- package/src/modules/chats/chats.server.js +32 -0
- package/src/modules/events/controllers/tickets.controller.js +3 -3
- package/src/modules/files/files.server.js +17 -7
- package/src/modules/products/components/layouts/Marketplace.vue +1 -0
- package/src/modules/products/components/pages/Catalog.vue +5 -3
- package/src/modules/reports/models/report.model.js +4 -4
- package/src/modules/reports/reports.client.js +35 -14
- package/src/modules/reports/reports.server.js +27 -8
package/dist/prometheus-framework/src/modules/spots/components/blocks/SpotMemberModify.vue.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref, computed, resolveComponent, openBlock, createElementBlock, createElementVNode, createBlock, toDisplayString, createCommentVNode } from "vue";
|
2
2
|
/* empty css */
|
3
3
|
import _export_sfc from "../../../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
-
/* empty css
|
4
|
+
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
const _hoisted_1 = { class: "br-grey-transp-25 radius-small mn-b-small" };
|
7
7
|
const _hoisted_2 = {
|
@@ -3,7 +3,7 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
3
3
|
const vue = require("vue");
|
4
4
|
const vueRouter = require("vue-router");
|
5
5
|
const vueI18n = require("vue-i18n");
|
6
|
-
;/* empty css
|
6
|
+
;/* empty css */
|
7
7
|
;/* empty css */
|
8
8
|
;/* empty css */
|
9
9
|
;/* empty css */
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref, onMounted, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, toDisplayString, createCommentVNode, createVNode, withCtx, Transition, createBlock, resolveDynamicComponent } from "vue";
|
2
2
|
import { useRoute, useRouter } from "vue-router";
|
3
3
|
import { useI18n } from "vue-i18n";
|
4
|
-
/* empty css
|
4
|
+
/* empty css */
|
5
5
|
/* empty css */
|
6
6
|
/* empty css */
|
7
7
|
/* empty css */
|
@@ -1,7 +1,7 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
3
3
|
const vue = require("vue");
|
4
|
-
const Spoiler = require("../../../../components/Spoiler/Spoiler.
|
4
|
+
const Spoiler = require("../../../../components/Spoiler/Spoiler.vue.cjs");
|
5
5
|
const Map = require("../../../../components/Map/Map.vue.cjs");
|
6
6
|
const SpotSub = require("../blocks/SpotSub.vue.cjs");
|
7
7
|
const CardUser = require("../../../auth/views/components/blocks/CardUser.vue.cjs");
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock, createElementBlock, createVNode, createElementVNode, withCtx, toDisplayString, createCommentVNode, Fragment, renderList, createBlock } from "vue";
|
2
|
-
import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.
|
2
|
+
import _sfc_main$1 from "../../../../components/Spoiler/Spoiler.vue.js";
|
3
3
|
import Map from "../../../../components/Map/Map.vue.js";
|
4
4
|
import SpotSub from "../blocks/SpotSub.vue.js";
|
5
5
|
import _sfc_main$2 from "../../../auth/views/components/blocks/CardUser.vue.js";
|
@@ -6,13 +6,13 @@ const Block = require("../../../../components/Block/Block.vue.cjs");
|
|
6
6
|
const UploadImage = require("../../../../components/UploadImage/UploadImage.vue.cjs");
|
7
7
|
;/* empty css */
|
8
8
|
const Field = require("../../../../components/Field/Field.vue2.cjs");
|
9
|
-
const Select = require("../../../../components/Select/Select.
|
9
|
+
const Select = require("../../../../components/Select/Select.vue.cjs");
|
10
10
|
const Checkbox = require("../../../../components/Checkbox/Checkbox.vue.cjs");
|
11
11
|
const Address = require("../../../../components/Address/Address.vue2.cjs");
|
12
12
|
const LocationMarker = require("../../../../components/LocationMarker/LocationMarker.vue2.cjs");
|
13
13
|
const Button = require("../../../../components/Button/Button.vue2.cjs");
|
14
14
|
require("vue-i18n");
|
15
|
-
;/* empty css
|
15
|
+
;/* empty css */
|
16
16
|
const spots = require("../../store/spots.cjs");
|
17
17
|
const _hoisted_1 = { class: "for-transition w-100 cols-1 pd-thin gap-thin" };
|
18
18
|
const _hoisted_2 = { class: "mn-r-auto" };
|
@@ -4,13 +4,13 @@ import _sfc_main$1 from "../../../../components/Block/Block.vue.js";
|
|
4
4
|
import _sfc_main$3 from "../../../../components/UploadImage/UploadImage.vue.js";
|
5
5
|
/* empty css */
|
6
6
|
import Field from "../../../../components/Field/Field.vue2.js";
|
7
|
-
import Select from "../../../../components/Select/Select.
|
7
|
+
import Select from "../../../../components/Select/Select.vue.js";
|
8
8
|
import _sfc_main$4 from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
9
|
import _sfc_main$5 from "../../../../components/Address/Address.vue2.js";
|
10
10
|
import _sfc_main$6 from "../../../../components/LocationMarker/LocationMarker.vue2.js";
|
11
11
|
import _sfc_main$2 from "../../../../components/Button/Button.vue2.js";
|
12
12
|
import "vue-i18n";
|
13
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
14
|
import { actions, state } from "../../store/spots.js";
|
15
15
|
const _hoisted_1 = { class: "for-transition w-100 cols-1 pd-thin gap-thin" };
|
16
16
|
const _hoisted_2 = { class: "mn-r-auto" };
|
package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.cjs
CHANGED
@@ -6,7 +6,7 @@ const bignumber = require("../../../../../../node_modules/bignumber.js/bignumber
|
|
6
6
|
const wallet_store = require("../../store/wallet.store.cjs");
|
7
7
|
const wallet = require("../../localization/wallet.json.cjs");
|
8
8
|
const Field = require("../../../../../components/Field/Field.vue2.cjs");
|
9
|
-
const Select = require("../../../../../components/Select/Select.
|
9
|
+
const Select = require("../../../../../components/Select/Select.vue.cjs");
|
10
10
|
const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
|
11
11
|
const _hoisted_2 = { class: "t-semi" };
|
12
12
|
const _hoisted_3 = ["disabled"];
|
package/dist/prometheus-framework/src/modules/wallet/views/components/blocks/CryptoDeposit.vue.js
CHANGED
@@ -4,7 +4,7 @@ import { BigNumber } from "../../../../../../node_modules/bignumber.js/bignumber
|
|
4
4
|
import { state, actions } from "../../store/wallet.store.js";
|
5
5
|
import text from "../../localization/wallet.json.js";
|
6
6
|
import Field from "../../../../../components/Field/Field.vue2.js";
|
7
|
-
import Select from "../../../../../components/Select/Select.
|
7
|
+
import Select from "../../../../../components/Select/Select.vue.js";
|
8
8
|
const _hoisted_1 = { class: "mn-b-small t-center t-bold" };
|
9
9
|
const _hoisted_2 = { class: "t-semi" };
|
10
10
|
const _hoisted_3 = ["disabled"];
|
@@ -5,10 +5,10 @@ const vueI18n = require("vue-i18n");
|
|
5
5
|
const Web3 = require("web3");
|
6
6
|
const wallet_store = require("../../store/wallet.store.cjs");
|
7
7
|
const wallet = require("../../localization/wallet.json.cjs");
|
8
|
-
const Popup = require("../../../../../components/Popup/Popup.
|
8
|
+
const Popup = require("../../../../../components/Popup/Popup.vue.cjs");
|
9
9
|
const Button = require("../../../../../components/Button/Button.vue2.cjs");
|
10
10
|
require("vue-router");
|
11
|
-
;/* empty css
|
11
|
+
;/* empty css */
|
12
12
|
require("../../../../reports/store/reports.cjs");
|
13
13
|
;/* empty css */
|
14
14
|
;/* empty css */
|
@@ -3,10 +3,10 @@ import { useI18n } from "vue-i18n";
|
|
3
3
|
import Web3 from "web3";
|
4
4
|
import { state, actions } from "../../store/wallet.store.js";
|
5
5
|
import text from "../../localization/wallet.json.js";
|
6
|
-
import _sfc_main$3 from "../../../../../components/Popup/Popup.
|
6
|
+
import _sfc_main$3 from "../../../../../components/Popup/Popup.vue.js";
|
7
7
|
import _sfc_main$1 from "../../../../../components/Button/Button.vue2.js";
|
8
8
|
import "vue-router";
|
9
|
-
/* empty css
|
9
|
+
/* empty css */
|
10
10
|
import "../../../../reports/store/reports.js";
|
11
11
|
/* empty css */
|
12
12
|
/* empty css */
|
package/dist/reports.server.js
CHANGED
@@ -75,8 +75,8 @@ var reports_routes = function(app, db, origins) {
|
|
75
75
|
controller.delete
|
76
76
|
);
|
77
77
|
};
|
78
|
-
var report_model = (
|
79
|
-
const ReportSchema = new mongoose.Schema({
|
78
|
+
var report_model = (db) => {
|
79
|
+
const ReportSchema = new db.mongoose.Schema({
|
80
80
|
status: {
|
81
81
|
type: String,
|
82
82
|
enum: [
|
@@ -119,7 +119,7 @@ var report_model = (mongoose) => {
|
|
119
119
|
},
|
120
120
|
target: {
|
121
121
|
// заменяем 'organization' на 'target', так как это может быть или User, или Organization
|
122
|
-
type: mongoose.Schema.Types.ObjectId,
|
122
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
123
123
|
ref: function(value) {
|
124
124
|
if (this.type === "user") return "User";
|
125
125
|
if (this.type === "organization") return "Organization";
|
@@ -129,16 +129,29 @@ var report_model = (mongoose) => {
|
|
129
129
|
}, {
|
130
130
|
timestamps: { currentTime: () => Date.now() }
|
131
131
|
});
|
132
|
-
const Report = mongoose.model("Report", ReportSchema);
|
132
|
+
const Report = db.mongoose.model("Report", ReportSchema);
|
133
133
|
return Report;
|
134
134
|
};
|
135
|
-
const
|
135
|
+
const ReportsController = reports_controller;
|
136
136
|
const reportsRoutes = reports_routes;
|
137
137
|
const ReportModel = report_model;
|
138
|
+
function initializeReports(app, db, origins, publicPath) {
|
139
|
+
db.report = ReportModel(db);
|
140
|
+
if (app) {
|
141
|
+
reportsRoutes(app, db);
|
142
|
+
}
|
143
|
+
}
|
138
144
|
var reports_server = {
|
139
|
-
|
140
|
-
|
141
|
-
|
145
|
+
initialize: initializeReports,
|
146
|
+
models: {
|
147
|
+
ReportModel
|
148
|
+
},
|
149
|
+
routes: {
|
150
|
+
reportsRoutes
|
151
|
+
},
|
152
|
+
controllers: {
|
153
|
+
ReportsController
|
154
|
+
}
|
142
155
|
};
|
143
156
|
const reports_server$1 = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(reports_server);
|
144
157
|
module.exports = reports_server$1;
|
package/dist/reports.server.mjs
CHANGED
@@ -74,8 +74,8 @@ var reports_routes = function(app, db, origins) {
|
|
74
74
|
controller.delete
|
75
75
|
);
|
76
76
|
};
|
77
|
-
var report_model = (
|
78
|
-
const ReportSchema = new mongoose.Schema({
|
77
|
+
var report_model = (db) => {
|
78
|
+
const ReportSchema = new db.mongoose.Schema({
|
79
79
|
status: {
|
80
80
|
type: String,
|
81
81
|
enum: [
|
@@ -118,7 +118,7 @@ var report_model = (mongoose) => {
|
|
118
118
|
},
|
119
119
|
target: {
|
120
120
|
// заменяем 'organization' на 'target', так как это может быть или User, или Organization
|
121
|
-
type: mongoose.Schema.Types.ObjectId,
|
121
|
+
type: db.mongoose.Schema.Types.ObjectId,
|
122
122
|
ref: function(value) {
|
123
123
|
if (this.type === "user") return "User";
|
124
124
|
if (this.type === "organization") return "Organization";
|
@@ -128,16 +128,29 @@ var report_model = (mongoose) => {
|
|
128
128
|
}, {
|
129
129
|
timestamps: { currentTime: () => Date.now() }
|
130
130
|
});
|
131
|
-
const Report = mongoose.model("Report", ReportSchema);
|
131
|
+
const Report = db.mongoose.model("Report", ReportSchema);
|
132
132
|
return Report;
|
133
133
|
};
|
134
|
-
const
|
134
|
+
const ReportsController = reports_controller;
|
135
135
|
const reportsRoutes = reports_routes;
|
136
136
|
const ReportModel = report_model;
|
137
|
+
function initializeReports(app, db, origins, publicPath) {
|
138
|
+
db.report = ReportModel(db);
|
139
|
+
if (app) {
|
140
|
+
reportsRoutes(app, db);
|
141
|
+
}
|
142
|
+
}
|
137
143
|
var reports_server = {
|
138
|
-
|
139
|
-
|
140
|
-
|
144
|
+
initialize: initializeReports,
|
145
|
+
models: {
|
146
|
+
ReportModel
|
147
|
+
},
|
148
|
+
routes: {
|
149
|
+
reportsRoutes
|
150
|
+
},
|
151
|
+
controllers: {
|
152
|
+
ReportsController
|
153
|
+
}
|
141
154
|
};
|
142
155
|
const reports_server$1 = /* @__PURE__ */ getDefaultExportFromCjs(reports_server);
|
143
156
|
export {
|