@hedhog/admin 0.0.121 → 0.0.123
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth/auth.controller.d.ts +10 -1
- package/dist/auth/auth.controller.d.ts.map +1 -1
- package/dist/auth/auth.controller.js +6 -6
- package/dist/auth/auth.controller.js.map +1 -1
- package/dist/auth/auth.service.d.ts +10 -1
- package/dist/auth/auth.service.d.ts.map +1 -1
- package/dist/auth/guards/auth.guard.js +2 -2
- package/dist/auth/guards/auth.guard.js.map +1 -1
- package/dist/menu/dto/create.dto.d.ts +1 -1
- package/dist/menu/dto/create.dto.js +3 -3
- package/dist/menu/menu.controller.d.ts +33 -6
- package/dist/menu/menu.controller.d.ts.map +1 -1
- package/dist/menu/menu.controller.js +5 -5
- package/dist/menu/menu.controller.js.map +1 -1
- package/dist/menu/menu.service.d.ts +33 -6
- package/dist/menu/menu.service.d.ts.map +1 -1
- package/dist/menu/menu.service.js +4 -4
- package/dist/menu/menu.service.js.map +1 -1
- package/dist/menu/menu.service.spec.d.ts +0 -1
- package/dist/menu/menu.service.spec.js +206 -190
- package/dist/menu/menu.service.spec.js.map +1 -1
- package/dist/role/guards/role.guard.js +3 -3
- package/dist/role/guards/role.guard.js.map +1 -1
- package/dist/role/role.controller.d.ts +5 -5
- package/dist/role/role.controller.js +4 -4
- package/dist/role/role.controller.js.map +1 -1
- package/dist/role/role.service.d.ts +7 -7
- package/dist/role/role.service.d.ts.map +1 -1
- package/dist/role/role.service.js +8 -4
- package/dist/role/role.service.js.map +1 -1
- package/dist/route/route.controller.d.ts +27 -6
- package/dist/route/route.controller.d.ts.map +1 -1
- package/dist/route/route.controller.js +2 -2
- package/dist/route/route.controller.js.map +1 -1
- package/dist/route/route.service.d.ts +27 -6
- package/dist/route/route.service.d.ts.map +1 -1
- package/dist/route/route.service.spec.d.ts +0 -1
- package/dist/route/route.service.spec.js +260 -249
- package/dist/route/route.service.spec.js.map +1 -1
- package/dist/screen/dto/create.dto.d.ts +0 -2
- package/dist/screen/dto/create.dto.d.ts.map +1 -1
- package/dist/screen/dto/create.dto.js +0 -10
- package/dist/screen/dto/create.dto.js.map +1 -1
- package/dist/screen/screen.controller.d.ts +24 -6
- package/dist/screen/screen.controller.d.ts.map +1 -1
- package/dist/screen/screen.controller.js +2 -2
- package/dist/screen/screen.controller.js.map +1 -1
- package/dist/screen/screen.service.d.ts +24 -6
- package/dist/screen/screen.service.d.ts.map +1 -1
- package/dist/screen/screen.service.js +1 -3
- package/dist/screen/screen.service.js.map +1 -1
- package/dist/screen/screen.service.spec.d.ts +0 -1
- package/dist/screen/screen.service.spec.js +257 -240
- package/dist/screen/screen.service.spec.js.map +1 -1
- package/dist/user/user.controller.d.ts +32 -5
- package/dist/user/user.controller.d.ts.map +1 -1
- package/dist/user/user.controller.js +2 -2
- package/dist/user/user.controller.js.map +1 -1
- package/dist/user/user.service.d.ts +32 -5
- package/dist/user/user.service.d.ts.map +1 -1
- package/hedhog.yaml +5 -5
- package/package.json +3 -3
- package/src/auth/auth.controller.ts +1 -1
- package/src/auth/guards/auth.guard.ts +1 -1
- package/src/menu/dto/create.dto.ts +3 -3
- package/src/menu/menu.controller.ts +3 -3
- package/src/menu/menu.service.spec.ts +247 -247
- package/src/menu/menu.service.ts +3 -3
- package/src/role/guards/role.guard.ts +1 -1
- package/src/role/role.controller.ts +3 -3
- package/src/role/role.service.ts +8 -21
- package/src/route/route.controller.ts +1 -1
- package/src/route/route.service.spec.ts +300 -300
- package/src/screen/dto/create.dto.ts +0 -8
- package/src/screen/screen.controller.ts +1 -1
- package/src/screen/screen.service.spec.ts +298 -298
- package/src/screen/screen.service.ts +1 -3
- package/src/user/user.controller.ts +1 -1
@@ -1,192 +1,208 @@
|
|
1
1
|
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
2
|
+
// import {
|
3
|
+
// PageOrderDirection,
|
4
|
+
// PaginationDTO,
|
5
|
+
// PaginationService,
|
6
|
+
// } from '@hedhog/pagination';
|
7
|
+
// import { PrismaService } from '@hedhog/prisma';
|
8
|
+
// import { BadRequestException } from '@nestjs/common';
|
9
|
+
// import { Test, TestingModule } from '@nestjs/testing';
|
10
|
+
// import { MenuService } from './menu.service';
|
11
|
+
// describe('MenuService', () => {
|
12
|
+
// let menuService: MenuService;
|
13
|
+
// let prismaService: PrismaService;
|
14
|
+
// let paginationService: PaginationService;
|
15
|
+
// const mockPrismaService = {
|
16
|
+
// menu: {
|
17
|
+
// create: jest.fn(),
|
18
|
+
// update: jest.fn(),
|
19
|
+
// deleteMany: jest.fn(),
|
20
|
+
// findUnique: jest.fn(),
|
21
|
+
// findMany: jest.fn(),
|
22
|
+
// count: jest.fn(),
|
23
|
+
// },
|
24
|
+
// role_menu: {
|
25
|
+
// deleteMany: jest.fn(),
|
26
|
+
// createMany: jest.fn(),
|
27
|
+
// },
|
28
|
+
// menu_screen: {
|
29
|
+
// deleteMany: jest.fn(),
|
30
|
+
// createMany: jest.fn(),
|
31
|
+
// },
|
32
|
+
// };
|
33
|
+
// const mockPaginationService = {
|
34
|
+
// paginate: jest.fn(),
|
35
|
+
// createInsensitiveSearch: jest.fn(),
|
36
|
+
// };
|
37
|
+
// beforeEach(async () => {
|
38
|
+
// const module: TestingModule = await Test.createTestingModule({
|
39
|
+
// providers: [
|
40
|
+
// MenuService,
|
41
|
+
// { provide: PrismaService, useValue: mockPrismaService },
|
42
|
+
// { provide: PaginationService, useValue: mockPaginationService },
|
43
|
+
// ],
|
44
|
+
// }).compile();
|
45
|
+
// menuService = module.get<MenuService>(MenuService);
|
46
|
+
// prismaService = module.get<PrismaService>(PrismaService);
|
47
|
+
// paginationService = module.get<PaginationService>(PaginationService);
|
48
|
+
// });
|
49
|
+
// afterEach(() => {
|
50
|
+
// jest.clearAllMocks();
|
51
|
+
// });
|
52
|
+
// describe('create', () => {
|
53
|
+
// it('should create a new menu', async () => {
|
54
|
+
// const createMenuDto = {
|
55
|
+
// name: 'Test Menu',
|
56
|
+
// url: '/test',
|
57
|
+
// icon: 'test-icon',
|
58
|
+
// order: 1,
|
59
|
+
// menu_id: undefined,
|
60
|
+
// };
|
61
|
+
// mockPrismaService.menu.create.mockResolvedValue(createMenuDto);
|
62
|
+
// const result = await menuService.create(createMenuDto);
|
63
|
+
// expect(result).toEqual(createMenuDto);
|
64
|
+
// expect(prismaService.menu.create).toHaveBeenCalledWith({
|
65
|
+
// data: createMenuDto,
|
66
|
+
// });
|
67
|
+
// });
|
68
|
+
// });
|
69
|
+
// describe('update', () => {
|
70
|
+
// it('should update a menu', async () => {
|
71
|
+
// const updateDto = { id: 1, data: { name: 'Updated Menu' } };
|
72
|
+
// mockPrismaService.menu.update.mockResolvedValue(updateDto.data);
|
73
|
+
// const result = await menuService.update(updateDto);
|
74
|
+
// expect(result).toEqual(updateDto.data);
|
75
|
+
// expect(prismaService.menu.update).toHaveBeenCalledWith({
|
76
|
+
// where: { id: updateDto.id },
|
77
|
+
// data: updateDto.data,
|
78
|
+
// });
|
79
|
+
// });
|
80
|
+
// });
|
81
|
+
// describe('delete', () => {
|
82
|
+
// it('should delete menu', async () => {
|
83
|
+
// const deleteDto = { ids: [1, 2, 3] };
|
84
|
+
// mockPrismaService.menu.deleteMany.mockResolvedValue({ count: 3 });
|
85
|
+
// const result = await menuService.delete(deleteDto);
|
86
|
+
// expect(result).toEqual({ count: 3 });
|
87
|
+
// expect(prismaService.menu.deleteMany).toHaveBeenCalledWith({
|
88
|
+
// where: { id: { in: deleteDto.ids } },
|
89
|
+
// });
|
90
|
+
// });
|
91
|
+
// it('should throw BadRequestException if no ids are provided', async () => {
|
92
|
+
// await expect(menuService.delete({ ids: null })).rejects.toThrow(
|
93
|
+
// BadRequestException,
|
94
|
+
// );
|
95
|
+
// });
|
96
|
+
// });
|
97
|
+
// describe('listScreens', () => {
|
98
|
+
// it('should paginate screens', async () => {
|
99
|
+
// const locale = 'en';
|
100
|
+
// const menuId = 1;
|
101
|
+
// const paginationParams: PaginationDTO = {
|
102
|
+
// page: 1,
|
103
|
+
// pageSize: 10,
|
104
|
+
// search: '',
|
105
|
+
// sortField: '',
|
106
|
+
// sortOrder: PageOrderDirection.Asc,
|
107
|
+
// fields: '',
|
108
|
+
// };
|
109
|
+
// const mockScreens = [{ id: 1, name: 'Screen 1' }];
|
110
|
+
// mockPaginationService.paginate.mockResolvedValue(mockScreens);
|
111
|
+
// const result = await menuService.listScreens(
|
112
|
+
// locale,
|
113
|
+
// menuId,
|
114
|
+
// paginationParams,
|
115
|
+
// );
|
116
|
+
// expect(result).toEqual(mockScreens);
|
117
|
+
// expect(paginationService.paginate).toHaveBeenCalledWith(
|
118
|
+
// prismaService.screens,
|
119
|
+
// paginationParams,
|
120
|
+
// expect.anything(),
|
121
|
+
// 'screen_locale',
|
122
|
+
// );
|
123
|
+
// });
|
124
|
+
// });
|
125
|
+
// describe('updateScreens', () => {
|
126
|
+
// it('should update screens associated with a menu', async () => {
|
127
|
+
// const menuId = 1;
|
128
|
+
// const updateData = { ids: [1, 2, 3] };
|
129
|
+
// jest
|
130
|
+
// .spyOn(prismaService.menu_screen, 'deleteMany')
|
131
|
+
// .mockResolvedValue(null);
|
132
|
+
// jest
|
133
|
+
// .spyOn(prismaService.menu_screen, 'createMany')
|
134
|
+
// .mockResolvedValue(null);
|
135
|
+
// await menuService.updateScreens(menuId, updateData);
|
136
|
+
// expect(prismaService.menu_screen.deleteMany).toHaveBeenCalledWith({
|
137
|
+
// where: { menu_id: menuId },
|
138
|
+
// });
|
139
|
+
// expect(prismaService.menu_screen.createMany).toHaveBeenCalledWith({
|
140
|
+
// data: updateData.ids.map((screenId) => ({
|
141
|
+
// menu_id: menuId,
|
142
|
+
// screen_id: screenId,
|
143
|
+
// })),
|
144
|
+
// skipDuplicates: true,
|
145
|
+
// });
|
146
|
+
// });
|
147
|
+
// });
|
148
|
+
// describe('updateRoles', () => {
|
149
|
+
// it('should update role associated with a menu', async () => {
|
150
|
+
// const menuId = 1;
|
151
|
+
// const updateData = { ids: [1, 2] };
|
152
|
+
// jest.spyOn(prismaService.role_menu, 'deleteMany').mockResolvedValue(null);
|
153
|
+
// jest.spyOn(prismaService.role_menu, 'createMany').mockResolvedValue(null);
|
154
|
+
// await menuService.updateRoles(menuId, updateData);
|
155
|
+
// expect(prismaService.role_menu.deleteMany).toHaveBeenCalledWith({
|
156
|
+
// where: { menu_id: menuId },
|
157
|
+
// });
|
158
|
+
// expect(prismaService.role_menu.createMany).toHaveBeenCalledWith({
|
159
|
+
// data: updateData.ids.map((roleId) => ({
|
160
|
+
// menu_id: menuId,
|
161
|
+
// role_id: roleId,
|
162
|
+
// })),
|
163
|
+
// skipDuplicates: true,
|
164
|
+
// });
|
165
|
+
// });
|
166
|
+
// });
|
167
|
+
// describe('updateOrder', () => {
|
168
|
+
// it('should update the order of menu', async () => {
|
169
|
+
// const orderData = { ids: [1, 2, 3] };
|
170
|
+
// jest.spyOn(prismaService.menu, 'count').mockResolvedValue(3);
|
171
|
+
// jest.spyOn(prismaService.menu, 'update').mockResolvedValue(null);
|
172
|
+
// await menuService.updateOrder(orderData);
|
173
|
+
// expect(prismaService.menu.count).toHaveBeenCalledWith({
|
174
|
+
// where: { id: { in: orderData.ids } },
|
175
|
+
// });
|
176
|
+
// expect(prismaService.menu.update).toHaveBeenCalledTimes(
|
177
|
+
// orderData.ids.length,
|
178
|
+
// );
|
179
|
+
// orderData.ids.forEach((id, index) => {
|
180
|
+
// expect(prismaService.menu.update).toHaveBeenCalledWith({
|
181
|
+
// where: { id },
|
182
|
+
// data: { order: index + 1 },
|
183
|
+
// });
|
184
|
+
// });
|
185
|
+
// });
|
186
|
+
// it('should throw BadRequestException if IDs are invalid', async () => {
|
187
|
+
// const orderData = { ids: [1, 2, 3] };
|
188
|
+
// jest.spyOn(prismaService.menu, 'count').mockResolvedValue(2); // IDs não batem com o número esperado
|
189
|
+
// await expect(menuService.updateOrder(orderData)).rejects.toThrow(
|
190
|
+
// BadRequestException,
|
191
|
+
// );
|
192
|
+
// });
|
193
|
+
// });
|
194
|
+
// /*
|
195
|
+
// describe('getMenus', () => {
|
196
|
+
// it('should get menu for a user', async () => {
|
197
|
+
// const locale = 'en';
|
198
|
+
// const userId = 1;
|
199
|
+
// const mockMenus = [{ id: 1, name: 'Menu 1' }];
|
200
|
+
// mockPrismaService.menu.findMany.mockResolvedValue(mockMenus);
|
201
|
+
// const result = await menuService.getMenus(locale, userId);
|
202
|
+
// expect(result).toEqual(mockMenus);
|
203
|
+
// expect(prismaService.menu.findMany).toHaveBeenCalled();
|
204
|
+
// });
|
205
|
+
// });
|
206
|
+
// */
|
207
|
+
// });
|
192
208
|
//# sourceMappingURL=menu.service.spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"menu.service.spec.js","sourceRoot":"","sources":["../../src/menu/menu.service.spec.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"menu.service.spec.js","sourceRoot":"","sources":["../../src/menu/menu.service.spec.ts"],"names":[],"mappings":";AAAA,WAAW;AACX,wBAAwB;AACxB,mBAAmB;AACnB,uBAAuB;AACvB,+BAA+B;AAC/B,kDAAkD;AAClD,wDAAwD;AACxD,yDAAyD;AACzD,gDAA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AAc;AACd,YAAY;AACZ,UAAU;AAEV,8EAA8E;AAC9E,8CAA8C;AAE9C,6GAA6G;AAE7G,0EAA0E;AAC1E,+BAA+B;AAC/B,WAAW;AACX,UAAU;AACV,QAAQ;AACR,OAAO;AACP,iCAAiC;AACjC,qDAAqD;AACrD,6BAA6B;AAC7B,0BAA0B;AAC1B,uDAAuD;AACvD,sEAAsE;AAEtE,mEAAmE;AAEnE,2CAA2C;AAC3C,gEAAgE;AAChE,UAAU;AACV,QAAQ;AACR,OAAO;AACP,MAAM"}
|
@@ -17,7 +17,7 @@ const prisma_1 = require("@hedhog/prisma");
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
18
18
|
const constants_1 = require("@nestjs/common/constants");
|
19
19
|
const core_1 = require("@nestjs/core");
|
20
|
-
const
|
20
|
+
const core_2 = require("@hedhog/core");
|
21
21
|
let RoleGuard = class RoleGuard {
|
22
22
|
constructor(reflector, prisma) {
|
23
23
|
this.reflector = reflector;
|
@@ -25,14 +25,14 @@ let RoleGuard = class RoleGuard {
|
|
25
25
|
}
|
26
26
|
async canActivate(context) {
|
27
27
|
var _a, _b;
|
28
|
-
const isPublic = this.reflector.getAllAndOverride(
|
28
|
+
const isPublic = this.reflector.getAllAndOverride(core_2.IS_PUBLIC_KEY, [
|
29
29
|
context.getHandler(),
|
30
30
|
context.getClass(),
|
31
31
|
]);
|
32
32
|
if (isPublic) {
|
33
33
|
return true;
|
34
34
|
}
|
35
|
-
const withRole = this.reflector.getAllAndOverride(
|
35
|
+
const withRole = this.reflector.getAllAndOverride(core_2.WITH_ROLE, [
|
36
36
|
context.getHandler(),
|
37
37
|
context.getClass(),
|
38
38
|
]);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.guard.js","sourceRoot":"","sources":["../../../src/role/guards/role.guard.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA+C;AAC/C,2CAQwB;AACxB,wDAA2D;AAC3D,uCAAyC;AAEzC,
|
1
|
+
{"version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MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YAC1C,KAAK,EAAE;gBACL,MAAM,EAAE,UAAU;gBAClB,GAAG,EAAE,QAAQ;gBACb,UAAU,EAAE;oBACV,IAAI,EAAE;wBACJ,IAAI,EAAE;4BACJ,SAAS,EAAE;gCACT,IAAI,EAAE;oCACJ,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC;iCACxB;6BACF;yBACF;qBACF;iBACF;aACF;SACF,CAAC,CAAC;QAEH,OAAO,KAAK,KAAK,CAAC,CAAC;IACrB,CAAC;IAEO,sBAAsB,CAAC,OAAgB;;QAC7C,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,GAAG,MAAA,MAAA,OAAO,CAAC,OAAO,CAAC,aAAa,0CAAE,KAAK,CAAC,GAAG,CAAC,mCAAI,EAAE,CAAC;QACtE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/C,CAAC;CACF,CAAA;AAxGY,8BAAS;oBAAT,SAAS;IADrB,IAAA,mBAAU,GAAE;IAIR,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,sBAAa,CAAC,CAAC,CAAA;qCADrB,gBAAS;QAEH,sBAAa;GAJ7B,SAAS,CAwGrB"}
|
@@ -11,13 +11,13 @@ export declare class RoleController {
|
|
11
11
|
listMenus(paginationParams: any, roleId: number, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
12
12
|
listRoutes(paginationParams: any, roleId: number): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
13
13
|
listScreens(paginationParams: any, roleId: number, locale: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
14
|
-
updateUsers(roleId: number, data: UpdateIdsDTO): Promise<
|
15
|
-
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<
|
16
|
-
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<
|
17
|
-
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<
|
14
|
+
updateUsers(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
15
|
+
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
16
|
+
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
17
|
+
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
18
18
|
show(roleId: number, locale: any): Promise<any>;
|
19
19
|
create(data: CreateDTO): Promise<any>;
|
20
20
|
update(roleId: number, data: UpdateDTO): Promise<any>;
|
21
|
-
delete(data: DeleteDTO): Promise<
|
21
|
+
delete(data: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
22
22
|
}
|
23
23
|
//# sourceMappingURL=role.controller.d.ts.map
|
@@ -18,7 +18,7 @@ const common_1 = require("@nestjs/common");
|
|
18
18
|
const delete_dto_1 = require("../dto/delete.dto");
|
19
19
|
const update_ids_dto_1 = require("../dto/update-ids.dto");
|
20
20
|
const locale_1 = require("@hedhog/locale");
|
21
|
-
const
|
21
|
+
const core_1 = require("@hedhog/core");
|
22
22
|
const create_dto_1 = require("./dto/create.dto");
|
23
23
|
const update_dto_1 = require("./dto/update.dto");
|
24
24
|
const role_service_1 = require("./role.service");
|
@@ -104,7 +104,7 @@ __decorate([
|
|
104
104
|
__metadata("design:returntype", Promise)
|
105
105
|
], RoleController.prototype, "listRoutes", null);
|
106
106
|
__decorate([
|
107
|
-
(0, common_1.Get)(':roleId/
|
107
|
+
(0, common_1.Get)(':roleId/screen'),
|
108
108
|
__param(0, (0, pagination_1.Pagination)()),
|
109
109
|
__param(1, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
110
110
|
__param(2, (0, locale_1.Locale)()),
|
@@ -137,7 +137,7 @@ __decorate([
|
|
137
137
|
__metadata("design:returntype", Promise)
|
138
138
|
], RoleController.prototype, "updateRoutes", null);
|
139
139
|
__decorate([
|
140
|
-
(0, common_1.Patch)(':roleId/
|
140
|
+
(0, common_1.Patch)(':roleId/screen'),
|
141
141
|
__param(0, (0, common_1.Param)('roleId', common_1.ParseIntPipe)),
|
142
142
|
__param(1, (0, common_1.Body)()),
|
143
143
|
__metadata("design:type", Function),
|
@@ -175,7 +175,7 @@ __decorate([
|
|
175
175
|
__metadata("design:returntype", Promise)
|
176
176
|
], RoleController.prototype, "delete", null);
|
177
177
|
exports.RoleController = RoleController = __decorate([
|
178
|
-
(0,
|
178
|
+
(0, core_1.Role)(),
|
179
179
|
(0, common_1.Controller)('role'),
|
180
180
|
__param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => role_service_1.RoleService))),
|
181
181
|
__metadata("design:paramtypes", [role_service_1.RoleService])
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"role.controller.js","sourceRoot":"","sources":["../../src/role/role.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,kDAA8C;AAC9C,0DAAqD;AACrD,2CAAwC;AACxC,
|
1
|
+
{"version":3,"file":"role.controller.js","sourceRoot":"","sources":["../../src/role/role.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAWwB;AACxB,kDAA8C;AAC9C,0DAAqD;AACrD,2CAAwC;AACxC,uCAAoC;AACpC,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAItC,IAAM,cAAc,GAApB,MAAM,cAAc;IACzB,YAEmB,WAAwB;QAAxB,gBAAW,GAAX,WAAW,CAAa;IACxC,CAAC;IAGE,AAAN,KAAK,CAAC,IAAI,CAAe,gBAAgB,EAAY,MAAM;QACzD,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAGK,AAA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AAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;4CAEnC;yBArGU,cAAc;IAF1B,IAAA,WAAI,GAAE;IACN,IAAA,mBAAU,EAAC,MAAM,CAAC;IAGd,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,0BAAW,CAAC,CAAC,CAAA;qCACR,0BAAW;GAHhC,cAAc,CAsG1B"}
|
@@ -10,21 +10,21 @@ export declare class RoleService {
|
|
10
10
|
private readonly paginationService;
|
11
11
|
private readonly localeService;
|
12
12
|
constructor(prismaService: PrismaService, paginationService: PaginationService, localeService: LocaleService);
|
13
|
-
updateUsers(roleId: number, { ids }: UpdateIdsDTO): Promise<
|
14
|
-
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<
|
15
|
-
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<
|
16
|
-
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<
|
13
|
+
updateUsers(roleId: number, { ids }: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
14
|
+
updateScreens(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
15
|
+
updateRoutes(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
16
|
+
updateMenus(roleId: number, data: UpdateIdsDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
17
17
|
listUsers(roleId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
18
18
|
listMenus(locale: string, roleId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
19
19
|
listRoutes(roleId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
20
20
|
listScreens(locale: string, roleId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
21
21
|
list(locale: string, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
|
22
22
|
get(locale: string, roleId: number): Promise<any>;
|
23
|
-
create({ slug
|
24
|
-
update({ id, data: {
|
23
|
+
create({ slug }: CreateDTO): Promise<any>;
|
24
|
+
update({ id, data: { slug } }: {
|
25
25
|
id: number;
|
26
26
|
data: UpdateDTO;
|
27
27
|
}): Promise<any>;
|
28
|
-
delete({ ids }: DeleteDTO): Promise<
|
28
|
+
delete({ ids }: DeleteDTO): Promise<import(".prisma/client").Prisma.BatchPayload>;
|
29
29
|
}
|
30
30
|
//# sourceMappingURL=role.service.d.ts.map
|
@@ -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;AAQ/C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE7C,qBACa,WAAW;IAGpB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAElC,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAJb,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB,EAEpC,aAAa,EAAE,aAAa;IAGzC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY;IAgBjD,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAgBhD,YAAY,CA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