@hedhog/admin 0.0.16 → 0.0.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/role/dto/update-ids.dto.d.ts +4 -0
- package/dist/role/dto/update-ids.dto.d.ts.map +1 -0
- package/dist/role/dto/update-ids.dto.js +24 -0
- package/dist/role/dto/update-ids.dto.js.map +1 -0
- package/dist/role/dto/update-menus.dto.d.ts +4 -0
- package/dist/role/dto/update-menus.dto.d.ts.map +1 -0
- package/dist/role/dto/update-menus.dto.js +8 -0
- package/dist/role/dto/update-menus.dto.js.map +1 -0
- package/dist/role/dto/update-routes.dto.d.ts +4 -0
- package/dist/role/dto/update-routes.dto.d.ts.map +1 -0
- package/dist/role/dto/update-routes.dto.js +8 -0
- package/dist/role/dto/update-routes.dto.js.map +1 -0
- package/dist/role/dto/update-screens.dto.d.ts +4 -0
- package/dist/role/dto/update-screens.dto.d.ts.map +1 -0
- package/dist/role/dto/update-screens.dto.js +8 -0
- package/dist/role/dto/update-screens.dto.js.map +1 -0
- package/dist/role/dto/update-users.dto.d.ts +4 -0
- package/dist/role/dto/update-users.dto.d.ts.map +1 -0
- package/dist/role/dto/update-users.dto.js +8 -0
- package/dist/role/dto/update-users.dto.js.map +1 -0
- package/dist/role/role.controller.d.ts +12 -0
- package/dist/role/role.controller.d.ts.map +1 -1
- package/dist/role/role.controller.js +88 -0
- package/dist/role/role.controller.js.map +1 -1
- package/dist/role/role.service.d.ts +12 -0
- package/dist/role/role.service.d.ts.map +1 -1
- package/dist/role/role.service.js +76 -0
- package/dist/role/role.service.js.map +1 -1
- package/package.json +1 -1
- package/src/migrations/migrate-04.ts +32 -0
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-ids.dto.d.ts","sourceRoot":"","sources":["../../../src/role/dto/update-ids.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,YAAY;IAKvB,GAAG,EAAE,MAAM,EAAE,CAAC;CACf"}
|
@@ -0,0 +1,24 @@
|
|
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.UpdateIdsDTO = void 0;
|
13
|
+
const class_validator_1 = require("class-validator");
|
14
|
+
class UpdateIdsDTO {
|
15
|
+
}
|
16
|
+
exports.UpdateIdsDTO = UpdateIdsDTO;
|
17
|
+
__decorate([
|
18
|
+
(0, class_validator_1.IsInt)({
|
19
|
+
each: true,
|
20
|
+
}),
|
21
|
+
(0, class_validator_1.IsArray)(),
|
22
|
+
__metadata("design:type", Array)
|
23
|
+
], UpdateIdsDTO.prototype, "ids", void 0);
|
24
|
+
//# sourceMappingURL=update-ids.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-ids.dto.js","sourceRoot":"","sources":["../../../src/role/dto/update-ids.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,MAAa,YAAY;CAMxB;AAND,oCAMC;AADC;IAJC,IAAA,uBAAK,EAAC;QACL,IAAI,EAAE,IAAI;KACX,CAAC;IACD,IAAA,yBAAO,GAAE;;yCACI"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-menus.dto.d.ts","sourceRoot":"","sources":["../../../src/role/dto/update-menus.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,cAAe,SAAQ,YAAY;CAAG"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateMenusDTO = void 0;
|
4
|
+
const update_ids_dto_1 = require("./update-ids.dto");
|
5
|
+
class UpdateMenusDTO extends update_ids_dto_1.UpdateIdsDTO {
|
6
|
+
}
|
7
|
+
exports.UpdateMenusDTO = UpdateMenusDTO;
|
8
|
+
//# sourceMappingURL=update-menus.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-menus.dto.js","sourceRoot":"","sources":["../../../src/role/dto/update-menus.dto.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD,MAAa,cAAe,SAAQ,6BAAY;CAAG;AAAnD,wCAAmD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-routes.dto.d.ts","sourceRoot":"","sources":["../../../src/role/dto/update-routes.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,eAAgB,SAAQ,YAAY;CAAG"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateRoutesDTO = void 0;
|
4
|
+
const update_ids_dto_1 = require("./update-ids.dto");
|
5
|
+
class UpdateRoutesDTO extends update_ids_dto_1.UpdateIdsDTO {
|
6
|
+
}
|
7
|
+
exports.UpdateRoutesDTO = UpdateRoutesDTO;
|
8
|
+
//# sourceMappingURL=update-routes.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-routes.dto.js","sourceRoot":"","sources":["../../../src/role/dto/update-routes.dto.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD,MAAa,eAAgB,SAAQ,6BAAY;CAAG;AAApD,0CAAoD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-screens.dto.d.ts","sourceRoot":"","sources":["../../../src/role/dto/update-screens.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,gBAAiB,SAAQ,YAAY;CAAG"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateScreensDTO = void 0;
|
4
|
+
const update_ids_dto_1 = require("./update-ids.dto");
|
5
|
+
class UpdateScreensDTO extends update_ids_dto_1.UpdateIdsDTO {
|
6
|
+
}
|
7
|
+
exports.UpdateScreensDTO = UpdateScreensDTO;
|
8
|
+
//# sourceMappingURL=update-screens.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-screens.dto.js","sourceRoot":"","sources":["../../../src/role/dto/update-screens.dto.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD,MAAa,gBAAiB,SAAQ,6BAAY;CAAG;AAArD,4CAAqD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-users.dto.d.ts","sourceRoot":"","sources":["../../../src/role/dto/update-users.dto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,qBAAa,cAAe,SAAQ,YAAY;CAAG"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.UpdateUsersDTO = void 0;
|
4
|
+
const update_ids_dto_1 = require("./update-ids.dto");
|
5
|
+
class UpdateUsersDTO extends update_ids_dto_1.UpdateIdsDTO {
|
6
|
+
}
|
7
|
+
exports.UpdateUsersDTO = UpdateUsersDTO;
|
8
|
+
//# sourceMappingURL=update-users.dto.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"update-users.dto.js","sourceRoot":"","sources":["../../../src/role/dto/update-users.dto.ts"],"names":[],"mappings":";;;AAAA,qDAAgD;AAEhD,MAAa,cAAe,SAAQ,6BAAY;CAAG;AAAnD,wCAAmD"}
|
@@ -2,10 +2,22 @@ import { CreateDTO } from './dto/create.dto';
|
|
2
2
|
import { DeleteDTO } from './dto/delete.dto';
|
3
3
|
import { UpdateDTO } from './dto/update.dto';
|
4
4
|
import { RoleService } from './role.service';
|
5
|
+
import { UpdateUsersDTO } from './dto/update-users.dto';
|
6
|
+
import { UpdateMenusDTO } from './dto/update-menus.dto';
|
7
|
+
import { UpdateRoutesDTO } from './dto/update-routes.dto';
|
8
|
+
import { UpdateScreensDTO } from './dto/update-screens.dto';
|
5
9
|
export declare class RoleController {
|
6
10
|
private readonly roleService;
|
7
11
|
constructor(roleService: RoleService);
|
8
12
|
getRoles(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
13
|
+
listUsers(roleId: number): Promise<any>;
|
14
|
+
listMenus(roleId: number): Promise<any>;
|
15
|
+
listRoutes(roleId: number): Promise<any>;
|
16
|
+
listScreens(roleId: number): Promise<any>;
|
17
|
+
updateUsers(roleId: number, data: UpdateUsersDTO): Promise<any>;
|
18
|
+
updateMenus(roleId: number, data: UpdateMenusDTO): Promise<any>;
|
19
|
+
updateRoutes(roleId: number, data: UpdateRoutesDTO): Promise<any>;
|
20
|
+
updateScreens(roleId: number, data: UpdateScreensDTO): Promise<any>;
|
9
21
|
show(roleId: number): Promise<any>;
|
10
22
|
create(data: CreateDTO): Promise<any>;
|
11
23
|
update(roleId: number, data: UpdateDTO): Promise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.controller.d.ts","sourceRoot":"","sources":["../../src/role/role.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC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ACrC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
|
@@ -21,6 +21,10 @@ const update_dto_1 = require("./dto/update.dto");
|
|
21
21
|
const role_service_1 = require("./role.service");
|
22
22
|
const role_decorator_1 = require("./decorators/role.decorator");
|
23
23
|
const auth_guard_1 = require("../auth/guards/auth.guard");
|
24
|
+
const update_users_dto_1 = require("./dto/update-users.dto");
|
25
|
+
const update_menus_dto_1 = require("./dto/update-menus.dto");
|
26
|
+
const update_routes_dto_1 = require("./dto/update-routes.dto");
|
27
|
+
const update_screens_dto_1 = require("./dto/update-screens.dto");
|
24
28
|
let RoleController = class RoleController {
|
25
29
|
constructor(roleService) {
|
26
30
|
this.roleService = roleService;
|
@@ -28,6 +32,30 @@ let RoleController = class RoleController {
|
|
28
32
|
async getRoles(paginationParams) {
|
29
33
|
return this.roleService.getRoles(paginationParams);
|
30
34
|
}
|
35
|
+
async listUsers(roleId) {
|
36
|
+
return this.roleService.listUsers(roleId);
|
37
|
+
}
|
38
|
+
async listMenus(roleId) {
|
39
|
+
return this.roleService.listMenus(roleId);
|
40
|
+
}
|
41
|
+
async listRoutes(roleId) {
|
42
|
+
return this.roleService.listRoutes(roleId);
|
43
|
+
}
|
44
|
+
async listScreens(roleId) {
|
45
|
+
return this.roleService.listScreens(roleId);
|
46
|
+
}
|
47
|
+
async updateUsers(roleId, data) {
|
48
|
+
return this.roleService.updateUsers(roleId, data);
|
49
|
+
}
|
50
|
+
async updateMenus(roleId, data) {
|
51
|
+
return this.roleService.updateMenus(roleId, data);
|
52
|
+
}
|
53
|
+
async updateRoutes(roleId, data) {
|
54
|
+
return this.roleService.updateRoutes(roleId, data);
|
55
|
+
}
|
56
|
+
async updateScreens(roleId, data) {
|
57
|
+
return this.roleService.updateScreens(roleId, data);
|
58
|
+
}
|
31
59
|
async show(roleId) {
|
32
60
|
return this.roleService.get(roleId);
|
33
61
|
}
|
@@ -52,6 +80,66 @@ __decorate([
|
|
52
80
|
__metadata("design:paramtypes", [Object]),
|
53
81
|
__metadata("design:returntype", Promise)
|
54
82
|
], RoleController.prototype, "getRoles", null);
|
83
|
+
__decorate([
|
84
|
+
(0, common_1.Get)(':roleId/users'),
|
85
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
86
|
+
__metadata("design:type", Function),
|
87
|
+
__metadata("design:paramtypes", [Number]),
|
88
|
+
__metadata("design:returntype", Promise)
|
89
|
+
], RoleController.prototype, "listUsers", null);
|
90
|
+
__decorate([
|
91
|
+
(0, common_1.Get)(':roleId/menus'),
|
92
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
93
|
+
__metadata("design:type", Function),
|
94
|
+
__metadata("design:paramtypes", [Number]),
|
95
|
+
__metadata("design:returntype", Promise)
|
96
|
+
], RoleController.prototype, "listMenus", null);
|
97
|
+
__decorate([
|
98
|
+
(0, common_1.Get)(':roleId/routes'),
|
99
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
100
|
+
__metadata("design:type", Function),
|
101
|
+
__metadata("design:paramtypes", [Number]),
|
102
|
+
__metadata("design:returntype", Promise)
|
103
|
+
], RoleController.prototype, "listRoutes", null);
|
104
|
+
__decorate([
|
105
|
+
(0, common_1.Get)(':roleId/screens'),
|
106
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
107
|
+
__metadata("design:type", Function),
|
108
|
+
__metadata("design:paramtypes", [Number]),
|
109
|
+
__metadata("design:returntype", Promise)
|
110
|
+
], RoleController.prototype, "listScreens", null);
|
111
|
+
__decorate([
|
112
|
+
(0, common_1.Patch)(':roleId/users'),
|
113
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
114
|
+
__param(1, (0, common_1.Body)()),
|
115
|
+
__metadata("design:type", Function),
|
116
|
+
__metadata("design:paramtypes", [Number, update_users_dto_1.UpdateUsersDTO]),
|
117
|
+
__metadata("design:returntype", Promise)
|
118
|
+
], RoleController.prototype, "updateUsers", null);
|
119
|
+
__decorate([
|
120
|
+
(0, common_1.Patch)(':roleId/menus'),
|
121
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
122
|
+
__param(1, (0, common_1.Body)()),
|
123
|
+
__metadata("design:type", Function),
|
124
|
+
__metadata("design:paramtypes", [Number, update_menus_dto_1.UpdateMenusDTO]),
|
125
|
+
__metadata("design:returntype", Promise)
|
126
|
+
], RoleController.prototype, "updateMenus", null);
|
127
|
+
__decorate([
|
128
|
+
(0, common_1.Patch)(':roleId/routes'),
|
129
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
130
|
+
__param(1, (0, common_1.Body)()),
|
131
|
+
__metadata("design:type", Function),
|
132
|
+
__metadata("design:paramtypes", [Number, update_routes_dto_1.UpdateRoutesDTO]),
|
133
|
+
__metadata("design:returntype", Promise)
|
134
|
+
], RoleController.prototype, "updateRoutes", null);
|
135
|
+
__decorate([
|
136
|
+
(0, common_1.Patch)(':roleId/screens'),
|
137
|
+
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
138
|
+
__param(1, (0, common_1.Body)()),
|
139
|
+
__metadata("design:type", Function),
|
140
|
+
__metadata("design:paramtypes", [Number, update_screens_dto_1.UpdateScreensDTO]),
|
141
|
+
__metadata("design:returntype", Promise)
|
142
|
+
], RoleController.prototype, "updateScreens", null);
|
55
143
|
__decorate([
|
56
144
|
(0, common_1.Get)(':roleId'),
|
57
145
|
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.controller.js","sourceRoot":"","sources":["../../src/role/role.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAYwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,gEAAmD;AACnD,0DAAsD;
|
1
|
+
{"version":3,"file":"role.contro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AAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;yBAvFU,cAAc;IAH1B,IAAA,qBAAI,GAAE;IACN,IAAA,kBAAS,EAAC,sBAAS,CAAC;IACpB,IAAA,mBAAU,EAAC,OAAO,CAAC;IAGf,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAwF1B"}
|
@@ -3,10 +3,22 @@ import { PrismaService } from '@hedhog/prisma';
|
|
3
3
|
import { CreateDTO } from './dto/create.dto';
|
4
4
|
import { DeleteDTO } from './dto/delete.dto';
|
5
5
|
import { UpdateDTO } from './dto/update.dto';
|
6
|
+
import { UpdateUsersDTO } from './dto/update-users.dto';
|
7
|
+
import { UpdateMenusDTO } from './dto/update-menus.dto';
|
8
|
+
import { UpdateRoutesDTO } from './dto/update-routes.dto';
|
9
|
+
import { UpdateScreensDTO } from './dto/update-screens.dto';
|
6
10
|
export declare class RoleService {
|
7
11
|
private readonly prismaService;
|
8
12
|
private readonly paginationService;
|
9
13
|
constructor(prismaService: PrismaService, paginationService: PaginationService);
|
14
|
+
updateUsers(roleId: number, { ids }: UpdateUsersDTO): Promise<any>;
|
15
|
+
updateScreens(roleId: number, data: UpdateScreensDTO): Promise<any>;
|
16
|
+
updateRoutes(roleId: number, data: UpdateRoutesDTO): Promise<any>;
|
17
|
+
updateMenus(roleId: number, data: UpdateMenusDTO): Promise<any>;
|
18
|
+
listUsers(roleId: number): Promise<any>;
|
19
|
+
listMenus(roleId: number): Promise<any>;
|
20
|
+
listRoutes(roleId: number): Promise<any>;
|
21
|
+
listScreens(roleId: number): Promise<any>;
|
10
22
|
getRoles(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
11
23
|
get(roleId: number): Promise<any>;
|
12
24
|
create({ name, description }: CreateDTO): Promise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.service.d.ts","sourceRoot":"","sources":["../../src/role/role.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;
|
1
|
+
{"version":3,"file":"role.service.d.ts","sourceRoot":"","sources":["../../src/role/role.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAO/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,cAAc;IAgBnD,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB;IAgBpD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe;IAgBlD,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc;IAgBhD,SAAS,CAAC,MAAM,EAAE,MAAM;IAMxB,SAAS,CAAC,MAAM,EAAE,MAAM;IAMxB,UAAU,CAAC,MAAM,EAAE,MAAM;IAMzB,WAAW,CAAC,MAAM,EAAE,MAAM;IAM1B,QAAQ,CAAC,gBAAgB,EAAE,aAAa;IAmBxC,GAAG,CAAC,MAAM,EAAE,MAAM;IAMlB,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,SAAS;IASvC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,SAAS,CAAA;KAAE;IAOpD,MAAM,CAAC,EAAE,GAAG,EAAE,EAAE,SAAS;CAehC"}
|
@@ -21,6 +21,82 @@ let RoleService = class RoleService {
|
|
21
21
|
this.prismaService = prismaService;
|
22
22
|
this.paginationService = paginationService;
|
23
23
|
}
|
24
|
+
async updateUsers(roleId, { ids }) {
|
25
|
+
await this.prismaService.role_users.deleteMany({
|
26
|
+
where: {
|
27
|
+
role_id: roleId,
|
28
|
+
},
|
29
|
+
});
|
30
|
+
return this.prismaService.role_users.createMany({
|
31
|
+
data: ids.map((userId) => ({
|
32
|
+
role_id: roleId,
|
33
|
+
user_id: userId,
|
34
|
+
})),
|
35
|
+
skipDuplicates: true,
|
36
|
+
});
|
37
|
+
}
|
38
|
+
async updateScreens(roleId, data) {
|
39
|
+
await this.prismaService.role_screens.deleteMany({
|
40
|
+
where: {
|
41
|
+
role_id: roleId,
|
42
|
+
},
|
43
|
+
});
|
44
|
+
return this.prismaService.role_screens.createMany({
|
45
|
+
data: data.ids.map((screenId) => ({
|
46
|
+
role_id: roleId,
|
47
|
+
screen_id: screenId,
|
48
|
+
})),
|
49
|
+
skipDuplicates: true,
|
50
|
+
});
|
51
|
+
}
|
52
|
+
async updateRoutes(roleId, data) {
|
53
|
+
await this.prismaService.role_routes.deleteMany({
|
54
|
+
where: {
|
55
|
+
role_id: roleId,
|
56
|
+
},
|
57
|
+
});
|
58
|
+
return this.prismaService.role_routes.createMany({
|
59
|
+
data: data.ids.map((routeId) => ({
|
60
|
+
role_id: roleId,
|
61
|
+
route_id: routeId,
|
62
|
+
})),
|
63
|
+
skipDuplicates: true,
|
64
|
+
});
|
65
|
+
}
|
66
|
+
async updateMenus(roleId, data) {
|
67
|
+
await this.prismaService.role_menus.deleteMany({
|
68
|
+
where: {
|
69
|
+
role_id: roleId,
|
70
|
+
},
|
71
|
+
});
|
72
|
+
return this.prismaService.role_menus.createMany({
|
73
|
+
data: data.ids.map((menuId) => ({
|
74
|
+
role_id: roleId,
|
75
|
+
menu_id: menuId,
|
76
|
+
})),
|
77
|
+
skipDuplicates: true,
|
78
|
+
});
|
79
|
+
}
|
80
|
+
async listUsers(roleId) {
|
81
|
+
return this.prismaService.users.findMany({
|
82
|
+
where: { role_users: { some: { role_id: roleId } } },
|
83
|
+
});
|
84
|
+
}
|
85
|
+
async listMenus(roleId) {
|
86
|
+
return this.prismaService.menus.findMany({
|
87
|
+
where: { role_menus: { some: { role_id: roleId } } },
|
88
|
+
});
|
89
|
+
}
|
90
|
+
async listRoutes(roleId) {
|
91
|
+
return this.prismaService.routes.findMany({
|
92
|
+
where: { role_routes: { some: { role_id: roleId } } },
|
93
|
+
});
|
94
|
+
}
|
95
|
+
async listScreens(roleId) {
|
96
|
+
return this.prismaService.screens.findMany({
|
97
|
+
where: { roles: { some: { id: roleId } } },
|
98
|
+
});
|
99
|
+
}
|
24
100
|
async getRoles(paginationParams) {
|
25
101
|
const fields = ['name', 'description'];
|
26
102
|
const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.service.js","sourceRoot":"","sources":["../../src/role/role.service.ts"],"names":[],"mappings":";;;;;;;;;;;;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J,IAAI;gBACJ,WAAW;aACZ;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAmC;QACxD,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;YACrC,KAAK,EAAE,EAAE,EAAE,EAAE;YACb,IAAI;SACL,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAE,GAAG,EAAa;QAC7B,IAAI,GAAG,IAAI,SAAS,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC;YACpC,MAAM,IAAI,4BAAmB,CAC3B,oDAAoD,CACrD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,UAAU,CAAC;YACzC,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAxJY,kCAAW;sBAAX,WAAW;IADvB,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;IAEvC,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAiB,CAAC,CAAC,CAAA;qCADZ,sBAAa;QAET,8BAAiB;GAL5C,WAAW,CAwJvB"}
|
package/package.json
CHANGED
@@ -77,6 +77,38 @@ export class Migrate implements MigrationInterface {
|
|
77
77
|
url: '/roles/:roleId',
|
78
78
|
method: 'GET',
|
79
79
|
},
|
80
|
+
{
|
81
|
+
url: '/roles/:roleId/users',
|
82
|
+
method: 'GET',
|
83
|
+
},
|
84
|
+
{
|
85
|
+
url: '/roles/:roleId/menus',
|
86
|
+
method: 'GET',
|
87
|
+
},
|
88
|
+
{
|
89
|
+
url: '/roles/:roleId/routes',
|
90
|
+
method: 'GET',
|
91
|
+
},
|
92
|
+
{
|
93
|
+
url: '/roles/:roleId/screens',
|
94
|
+
method: 'GET',
|
95
|
+
},
|
96
|
+
{
|
97
|
+
url: '/roles/:roleId/users',
|
98
|
+
method: 'PATCH',
|
99
|
+
},
|
100
|
+
{
|
101
|
+
url: '/roles/:roleId/menus',
|
102
|
+
method: 'PATCH',
|
103
|
+
},
|
104
|
+
{
|
105
|
+
url: '/roles/:roleId/routes',
|
106
|
+
method: 'PATCH',
|
107
|
+
},
|
108
|
+
{
|
109
|
+
url: '/roles/:roleId/screens',
|
110
|
+
method: 'PATCH',
|
111
|
+
},
|
80
112
|
{
|
81
113
|
url: '/roles',
|
82
114
|
method: 'POST',
|