@campxdev/server-shared 1.4.0-alpha.4 → 1.4.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/domain/index.d.ts +1 -0
- package/dist/domain/index.d.ts.map +1 -1
- package/dist/domain/index.js +1 -0
- package/dist/domain/index.js.map +1 -1
- package/dist/domain/modules/shared-domain.module.d.ts.map +1 -1
- package/dist/domain/modules/shared-domain.module.js +3 -0
- package/dist/domain/modules/shared-domain.module.js.map +1 -1
- package/dist/domain/schemas/global-users.schema.d.ts +56 -0
- package/dist/domain/schemas/global-users.schema.d.ts.map +1 -0
- package/dist/domain/schemas/global-users.schema.js +112 -0
- package/dist/domain/schemas/global-users.schema.js.map +1 -0
- package/dist/media/managers/media-records-manager.js +2 -2
- package/dist/media/managers/media-records-manager.js.map +1 -1
- package/package.json +1 -1
package/dist/domain/index.d.ts
CHANGED
|
@@ -8,5 +8,6 @@ export * from './types/admin.type';
|
|
|
8
8
|
export * from './entities/profile-permission.entity';
|
|
9
9
|
export * from './entities/profile.entity';
|
|
10
10
|
export * from './entities/user.entity';
|
|
11
|
+
export * from './schemas/global-users.schema';
|
|
11
12
|
export * from './schemas/tenant.schema';
|
|
12
13
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AAGnC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wDAAwD,CAAC;AACvE,cAAc,wCAAwC,CAAC;AACvD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,oBAAoB,CAAC;AAGnC,cAAc,sCAAsC,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC"}
|
package/dist/domain/index.js
CHANGED
|
@@ -25,5 +25,6 @@ __exportStar(require("./types/admin.type"), exports);
|
|
|
25
25
|
__exportStar(require("./entities/profile-permission.entity"), exports);
|
|
26
26
|
__exportStar(require("./entities/profile.entity"), exports);
|
|
27
27
|
__exportStar(require("./entities/user.entity"), exports);
|
|
28
|
+
__exportStar(require("./schemas/global-users.schema"), exports);
|
|
28
29
|
__exportStar(require("./schemas/tenant.schema"), exports);
|
|
29
30
|
//# sourceMappingURL=index.js.map
|
package/dist/domain/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,iEAA+C;AAC/C,iEAA+C;AAC/C,yFAAuE;AACvE,yEAAuD;AACvD,gEAA8C;AAC9C,qDAAmC;AAEnC,gBAAgB;AAChB,uEAAqD;AACrD,4DAA0C;AAC1C,yDAAuC;AACvC,0DAAwC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/domain/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,iEAA+C;AAC/C,iEAA+C;AAC/C,iEAA+C;AAC/C,yFAAuE;AACvE,yEAAuD;AACvD,gEAA8C;AAC9C,qDAAmC;AAEnC,gBAAgB;AAChB,uEAAqD;AACrD,4DAA0C;AAC1C,yDAAuC;AACvC,gEAA8C;AAC9C,0DAAwC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-domain.module.d.ts","sourceRoot":"","sources":["../../../src/domain/modules/shared-domain.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared-domain.module.d.ts","sourceRoot":"","sources":["../../../src/domain/modules/shared-domain.module.ts"],"names":[],"mappings":"AAeA,qBAaa,kBAAkB;CAAG"}
|
|
@@ -11,6 +11,7 @@ const common_1 = require("@nestjs/common");
|
|
|
11
11
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
12
12
|
const mongodb_media_record_repository_1 = require("../mongodb-repositories/mongodb-media-record.repository");
|
|
13
13
|
const media_record_repository_1 = require("../repositories/media-record.repository");
|
|
14
|
+
const global_users_schema_1 = require("../schemas/global-users.schema");
|
|
14
15
|
const media_record_schema_1 = require("../schemas/media-record.schema");
|
|
15
16
|
const tenant_schema_1 = require("../schemas/tenant.schema");
|
|
16
17
|
const repos = [
|
|
@@ -28,6 +29,8 @@ exports.SharedDomainModule = SharedDomainModule = __decorate([
|
|
|
28
29
|
mongoose_1.MongooseModule.forFeature([
|
|
29
30
|
{ name: tenant_schema_1.Tenant.name, schema: tenant_schema_1.TenantSchema },
|
|
30
31
|
{ name: media_record_schema_1.MediaRecord.name, schema: media_record_schema_1.MediaRecordSchema },
|
|
32
|
+
// Deprecated
|
|
33
|
+
{ name: global_users_schema_1.GlobalUser.name, schema: global_users_schema_1.GlobalUserSchema },
|
|
31
34
|
]),
|
|
32
35
|
],
|
|
33
36
|
providers: [...repos],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared-domain.module.js","sourceRoot":"","sources":["../../../src/domain/modules/shared-domain.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAkD;AAClD,+CAAkD;AAClD,6GAAuG;AACvG,qFAAgF;AAChF,wEAAgF;AAChF,4DAAgE;AAEhE,MAAM,KAAK,GAAe;IACxB;QACE,OAAO,EAAE,+CAAqB;QAC9B,QAAQ,EAAE,8DAA4B;KACvC;CACF,CAAC;
|
|
1
|
+
{"version":3,"file":"shared-domain.module.js","sourceRoot":"","sources":["../../../src/domain/modules/shared-domain.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAkD;AAClD,+CAAkD;AAClD,6GAAuG;AACvG,qFAAgF;AAChF,wEAA8E;AAC9E,wEAAgF;AAChF,4DAAgE;AAEhE,MAAM,KAAK,GAAe;IACxB;QACE,OAAO,EAAE,+CAAqB;QAC9B,QAAQ,EAAE,8DAA4B;KACvC;CACF,CAAC;AAeK,IAAM,kBAAkB,GAAxB,MAAM,kBAAkB;CAAG,CAAA;AAArB,gDAAkB;6BAAlB,kBAAkB;IAb9B,IAAA,eAAM,EAAC;QACN,OAAO,EAAE;YACP,yBAAc,CAAC,UAAU,CAAC;gBACxB,EAAE,IAAI,EAAE,sBAAM,CAAC,IAAI,EAAE,MAAM,EAAE,4BAAY,EAAE;gBAC3C,EAAE,IAAI,EAAE,iCAAW,CAAC,IAAI,EAAE,MAAM,EAAE,uCAAiB,EAAE;gBAErD,aAAa;gBACb,EAAE,IAAI,EAAE,gCAAU,CAAC,IAAI,EAAE,MAAM,EAAE,sCAAgB,EAAE;aACpD,CAAC;SACH;QACD,SAAS,EAAE,CAAC,GAAG,KAAK,CAAC;QACrB,OAAO,EAAE,CAAC,yBAAc,EAAE,GAAG,KAAK,CAAC;KACpC,CAAC;GACW,kBAAkB,CAAG"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="mongoose/types/aggregate" />
|
|
2
|
+
/// <reference types="mongoose/types/callback" />
|
|
3
|
+
/// <reference types="mongoose/types/collection" />
|
|
4
|
+
/// <reference types="mongoose/types/connection" />
|
|
5
|
+
/// <reference types="mongoose/types/cursor" />
|
|
6
|
+
/// <reference types="mongoose/types/document" />
|
|
7
|
+
/// <reference types="mongoose/types/error" />
|
|
8
|
+
/// <reference types="mongoose/types/expressions" />
|
|
9
|
+
/// <reference types="mongoose/types/helpers" />
|
|
10
|
+
/// <reference types="mongoose/types/middlewares" />
|
|
11
|
+
/// <reference types="mongoose/types/indexes" />
|
|
12
|
+
/// <reference types="mongoose/types/models" />
|
|
13
|
+
/// <reference types="mongoose/types/mongooseoptions" />
|
|
14
|
+
/// <reference types="mongoose/types/pipelinestage" />
|
|
15
|
+
/// <reference types="mongoose/types/populate" />
|
|
16
|
+
/// <reference types="mongoose/types/query" />
|
|
17
|
+
/// <reference types="mongoose/types/schemaoptions" />
|
|
18
|
+
/// <reference types="mongoose/types/schematypes" />
|
|
19
|
+
/// <reference types="mongoose/types/session" />
|
|
20
|
+
/// <reference types="mongoose/types/types" />
|
|
21
|
+
/// <reference types="mongoose/types/utility" />
|
|
22
|
+
/// <reference types="mongoose/types/validation" />
|
|
23
|
+
/// <reference types="mongoose/types/virtuals" />
|
|
24
|
+
/// <reference types="mongoose/types/inferschematype" />
|
|
25
|
+
import { Document, Schema as MongooseSchema } from 'mongoose';
|
|
26
|
+
export declare const GlobalUserCName = "global_users";
|
|
27
|
+
export declare class GlobalUser extends Document {
|
|
28
|
+
tenantId: string;
|
|
29
|
+
institutionIds: number[];
|
|
30
|
+
userId: number;
|
|
31
|
+
username: string;
|
|
32
|
+
email: string;
|
|
33
|
+
isCounsellor: boolean;
|
|
34
|
+
password: string;
|
|
35
|
+
fullName: string;
|
|
36
|
+
isActive: boolean;
|
|
37
|
+
isSuperUser: boolean;
|
|
38
|
+
isAdminUser: boolean;
|
|
39
|
+
type: string;
|
|
40
|
+
workPhoneNumber: string;
|
|
41
|
+
personalPhoneNumber: string;
|
|
42
|
+
personalEmail: string;
|
|
43
|
+
lastLoggedIn: Date;
|
|
44
|
+
designationId: string;
|
|
45
|
+
departmentIds: string[];
|
|
46
|
+
tours: string[];
|
|
47
|
+
isMentor: boolean;
|
|
48
|
+
createdBy: string;
|
|
49
|
+
updatedBy: string;
|
|
50
|
+
}
|
|
51
|
+
export declare const GlobalUserSchema: MongooseSchema<GlobalUser, import("mongoose").Model<GlobalUser, any, any, any, Document<unknown, any, GlobalUser> & GlobalUser & {
|
|
52
|
+
_id: import("mongoose").Types.ObjectId;
|
|
53
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, GlobalUser, Document<unknown, {}, import("mongoose").FlatRecord<GlobalUser>> & import("mongoose").FlatRecord<GlobalUser> & {
|
|
54
|
+
_id: import("mongoose").Types.ObjectId;
|
|
55
|
+
}>;
|
|
56
|
+
//# sourceMappingURL=global-users.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-users.schema.d.ts","sourceRoot":"","sources":["../../../src/domain/schemas/global-users.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAC;AAG9D,eAAO,MAAM,eAAe,iBAAiB,CAAC;AAE9C,qBACa,UAAW,SAAQ,QAAQ;IAEtC,QAAQ,EAAE,MAAM,CAAC;IAGjB,cAAc,EAAE,MAAM,EAAE,CAAC;IAGzB,MAAM,EAAE,MAAM,CAAC;IAGf,QAAQ,EAAE,MAAM,CAAC;IAGjB,KAAK,EAAE,MAAM,CAAC;IAGd,YAAY,EAAE,OAAO,CAAC;IAGtB,QAAQ,EAAE,MAAM,CAAC;IAGjB,QAAQ,EAAE,MAAM,CAAC;IAGjB,QAAQ,EAAE,OAAO,CAAC;IAGlB,WAAW,EAAE,OAAO,CAAC;IAGrB,WAAW,EAAE,OAAO,CAAC;IAGrB,IAAI,EAAE,MAAM,CAAC;IAGb,eAAe,EAAE,MAAM,CAAC;IAGxB,mBAAmB,EAAE,MAAM,CAAC;IAG5B,aAAa,EAAE,MAAM,CAAC;IAGtB,YAAY,EAAE,IAAI,CAAC;IAGnB,aAAa,EAAE,MAAM,CAAC;IAGtB,aAAa,EAAE,MAAM,EAAE,CAAC;IAGxB,KAAK,EAAE,MAAM,EAAE,CAAC;IAGhB,QAAQ,EAAE,OAAO,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;IAGlB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB;;;;EAA2C,CAAC"}
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.GlobalUserSchema = exports.GlobalUser = exports.GlobalUserCName = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const mongoose_2 = require("mongoose");
|
|
15
|
+
const utils_1 = require("../../utils");
|
|
16
|
+
exports.GlobalUserCName = 'global_users';
|
|
17
|
+
let GlobalUser = class GlobalUser extends mongoose_2.Document {
|
|
18
|
+
};
|
|
19
|
+
exports.GlobalUser = GlobalUser;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId, index: true }),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], GlobalUser.prototype, "tenantId", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, mongoose_1.Prop)({ default: [] }),
|
|
26
|
+
__metadata("design:type", Array)
|
|
27
|
+
], GlobalUser.prototype, "institutionIds", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, mongoose_1.Prop)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], GlobalUser.prototype, "userId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, mongoose_1.Prop)({ required: true, unique: true }),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], GlobalUser.prototype, "username", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, mongoose_1.Prop)({ required: true, unique: true, lowercase: true }),
|
|
38
|
+
__metadata("design:type", String)
|
|
39
|
+
], GlobalUser.prototype, "email", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, mongoose_1.Prop)({ default: false }),
|
|
42
|
+
__metadata("design:type", Boolean)
|
|
43
|
+
], GlobalUser.prototype, "isCounsellor", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, mongoose_1.Prop)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], GlobalUser.prototype, "password", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], GlobalUser.prototype, "fullName", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, mongoose_1.Prop)({ default: true }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], GlobalUser.prototype, "isActive", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, mongoose_1.Prop)({ default: false }),
|
|
58
|
+
__metadata("design:type", Boolean)
|
|
59
|
+
], GlobalUser.prototype, "isSuperUser", void 0);
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, mongoose_1.Prop)({ default: false }),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], GlobalUser.prototype, "isAdminUser", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mongoose_1.Prop)({ default: utils_1.userType.staff_user }),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], GlobalUser.prototype, "type", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, mongoose_1.Prop)(),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], GlobalUser.prototype, "workPhoneNumber", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, mongoose_1.Prop)(),
|
|
74
|
+
__metadata("design:type", String)
|
|
75
|
+
], GlobalUser.prototype, "personalPhoneNumber", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, mongoose_1.Prop)({ lowercase: true }),
|
|
78
|
+
__metadata("design:type", String)
|
|
79
|
+
], GlobalUser.prototype, "personalEmail", void 0);
|
|
80
|
+
__decorate([
|
|
81
|
+
(0, mongoose_1.Prop)({ required: false }),
|
|
82
|
+
__metadata("design:type", Date)
|
|
83
|
+
], GlobalUser.prototype, "lastLoggedIn", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
86
|
+
__metadata("design:type", String)
|
|
87
|
+
], GlobalUser.prototype, "designationId", void 0);
|
|
88
|
+
__decorate([
|
|
89
|
+
(0, mongoose_1.Prop)({ type: [mongoose_2.Schema.Types.ObjectId], default: [] }),
|
|
90
|
+
__metadata("design:type", Array)
|
|
91
|
+
], GlobalUser.prototype, "departmentIds", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
(0, mongoose_1.Prop)({ default: [] }),
|
|
94
|
+
__metadata("design:type", Array)
|
|
95
|
+
], GlobalUser.prototype, "tours", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, mongoose_1.Prop)(),
|
|
98
|
+
__metadata("design:type", Boolean)
|
|
99
|
+
], GlobalUser.prototype, "isMentor", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], GlobalUser.prototype, "createdBy", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.ObjectId }),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], GlobalUser.prototype, "updatedBy", void 0);
|
|
108
|
+
exports.GlobalUser = GlobalUser = __decorate([
|
|
109
|
+
(0, mongoose_1.Schema)({ timestamps: true, id: true, collection: exports.GlobalUserCName })
|
|
110
|
+
], GlobalUser);
|
|
111
|
+
exports.GlobalUserSchema = mongoose_1.SchemaFactory.createForClass(GlobalUser);
|
|
112
|
+
//# sourceMappingURL=global-users.schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global-users.schema.js","sourceRoot":"","sources":["../../../src/domain/schemas/global-users.schema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+CAA+D;AAC/D,uCAA8D;AAC9D,uCAAuC;AAE1B,QAAA,eAAe,GAAG,cAAc,CAAC;AAGvC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,mBAAQ;CAkEvC,CAAA;AAlEY,gCAAU;AAErB;IADC,IAAA,eAAI,EAAC,EAAE,IAAI,EAAE,iBAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;4CAC1C;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC;;kDACG;AAGzB;IADC,IAAA,eAAI,GAAE;;0CACQ;AAGf;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;4CACtB;AAGjB;IADC,IAAA,eAAI,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC;;yCAC1C;AAG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BAAc,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC;;6CAC5B;qBAjEP,UAAU;IADtB,IAAA,iBAAM,EAAC,EAAE,UAAU,EAAE,IAAI,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,uBAAe,EAAE,CAAC;GACvD,UAAU,CAkEtB;AAEY,QAAA,gBAAgB,GAAG,wBAAa,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC"}
|
|
@@ -21,12 +21,12 @@ let MediaRecordsManager = class MediaRecordsManager {
|
|
|
21
21
|
async deleteMany(resources) {
|
|
22
22
|
if (!resources.length)
|
|
23
23
|
return;
|
|
24
|
-
await this.mediaRecordRepo.deleteByIds(resources.map((r) => r.id));
|
|
25
24
|
await this.awsManager.deleteFiles(resources.map((r) => r.key));
|
|
25
|
+
await this.mediaRecordRepo.deleteByIds(resources.map((r) => r.id));
|
|
26
26
|
}
|
|
27
27
|
async deleteOne(resource) {
|
|
28
|
-
await this.mediaRecordRepo.deleteByIds([resource.id]);
|
|
29
28
|
await this.awsManager.deleteFiles([resource.key]);
|
|
29
|
+
await this.mediaRecordRepo.deleteByIds([resource.id]);
|
|
30
30
|
}
|
|
31
31
|
async uploadToS3bucket(props) {
|
|
32
32
|
const uploadRes = await this.awsManager.uploadFile({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-records-manager.js","sourceRoot":"","sources":["../../../src/media/managers/media-records-manager.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,yCAKsB;AACtB,+CAA2C;AAWpC,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,UAAsB,EACtB,eAAsC;QADtC,eAAU,GAAV,UAAU,CAAY;QACtB,oBAAe,GAAf,eAAe,CAAuB;IACtD,CAAC;IAEJ,KAAK,CAAC,UAAU,CAAC,SAAwB;QACvC,IAAI,CAAC,SAAS,CAAC,MAAM;YAAE,OAAO;QAE9B,MAAM,IAAI,CAAC,
|
|
1
|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