@hedhog/admin 0.0.122 → 0.0.124
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth/auth.controller.js +6 -6
- package/dist/auth/auth.controller.js.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 +27 -3
- 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 +28 -4
- 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 +45 -5
- package/dist/role/role.controller.d.ts.map +1 -1
- package/dist/role/role.controller.js +4 -4
- package/dist/role/role.controller.js.map +1 -1
- package/dist/role/role.service.d.ts +47 -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 -3
- 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 -3
- 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 +27 -3
- 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 +28 -4
- 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 +18 -2
- 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 +18 -2
- package/dist/user/user.service.d.ts.map +1 -1
- package/package.json +6 -6
- 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,300 +1,300 @@
|
|
1
|
-
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
} from '@hedhog/pagination';
|
6
|
-
import { PrismaService } from '@hedhog/prisma';
|
7
|
-
import { Test, TestingModule } from '@nestjs/testing';
|
8
|
-
import { DeleteDTO } from '../dto/delete.dto';
|
9
|
-
import { UpdateIdsDTO } from '../dto/update-ids.dto';
|
10
|
-
import { CreateDTO } from './dto/create.dto';
|
11
|
-
import { UpdateDTO } from './dto/update.dto';
|
12
|
-
import { RouteService } from './route.service';
|
13
|
-
|
14
|
-
describe('RouteService', () => {
|
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
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
});
|
1
|
+
// import {
|
2
|
+
// PageOrderDirection,
|
3
|
+
// PaginationDTO,
|
4
|
+
// PaginationService,
|
5
|
+
// } from '@hedhog/pagination';
|
6
|
+
// import { PrismaService } from '@hedhog/prisma';
|
7
|
+
// import { Test, TestingModule } from '@nestjs/testing';
|
8
|
+
// import { DeleteDTO } from '../dto/delete.dto';
|
9
|
+
// import { UpdateIdsDTO } from '../dto/update-ids.dto';
|
10
|
+
// import { CreateDTO } from './dto/create.dto';
|
11
|
+
// import { UpdateDTO } from './dto/update.dto';
|
12
|
+
// import { RouteService } from './route.service';
|
13
|
+
|
14
|
+
// describe('RouteService', () => {
|
15
|
+
// let service: RouteService;
|
16
|
+
// let prismaService: PrismaService;
|
17
|
+
// let paginationService: PaginationService;
|
18
|
+
|
19
|
+
// const mockPrismaService = {
|
20
|
+
// route: {
|
21
|
+
// findUnique: jest.fn(),
|
22
|
+
// create: jest.fn(),
|
23
|
+
// update: jest.fn(),
|
24
|
+
// deleteMany: jest.fn(),
|
25
|
+
// },
|
26
|
+
// role_route: {
|
27
|
+
// deleteMany: jest.fn(),
|
28
|
+
// createMany: jest.fn(),
|
29
|
+
// },
|
30
|
+
// route_screens: {
|
31
|
+
// deleteMany: jest.fn(),
|
32
|
+
// createMany: jest.fn(),
|
33
|
+
// },
|
34
|
+
// createInsensitiveSearch: jest.fn(),
|
35
|
+
// };
|
36
|
+
|
37
|
+
// const mockPaginationService = {
|
38
|
+
// paginate: jest.fn(),
|
39
|
+
// };
|
40
|
+
|
41
|
+
// beforeEach(async () => {
|
42
|
+
// const module: TestingModule = await Test.createTestingModule({
|
43
|
+
// providers: [
|
44
|
+
// RouteService,
|
45
|
+
// { provide: PrismaService, useValue: mockPrismaService },
|
46
|
+
// { provide: PaginationService, useValue: mockPaginationService },
|
47
|
+
// ],
|
48
|
+
// }).compile();
|
49
|
+
|
50
|
+
// service = module.get<RouteService>(RouteService);
|
51
|
+
// prismaService = module.get<PrismaService>(PrismaService);
|
52
|
+
// paginationService = module.get<PaginationService>(PaginationService);
|
53
|
+
// });
|
54
|
+
|
55
|
+
// it('should be defined', () => {
|
56
|
+
// expect(service).toBeDefined();
|
57
|
+
// });
|
58
|
+
// /*
|
59
|
+
// describe('getRoutes', () => {
|
60
|
+
// it('should paginate route', async () => {
|
61
|
+
// const paginationParams: PaginationDTO = {
|
62
|
+
// page: 1,
|
63
|
+
// pageSize: 10,
|
64
|
+
// search: '',
|
65
|
+
// sortField: '',
|
66
|
+
// sortOrder: PageOrderDirection.Asc,
|
67
|
+
// fields: '',
|
68
|
+
// };
|
69
|
+
// const result = { data: [], total: 0 };
|
70
|
+
|
71
|
+
// mockPrismaService.createInsensitiveSearch.mockReturnValue([]);
|
72
|
+
// mockPaginationService.paginate.mockResolvedValue(result);
|
73
|
+
|
74
|
+
// const res = await service.getRoutes(paginationParams);
|
75
|
+
|
76
|
+
// expect(mockPrismaService.createInsensitiveSearch).toHaveBeenCalledWith(
|
77
|
+
// ['url', 'method'],
|
78
|
+
// paginationParams,
|
79
|
+
// );
|
80
|
+
// expect(mockPaginationService.paginate).toHaveBeenCalledWith(
|
81
|
+
// mockPrismaService.route,
|
82
|
+
// paginationParams,
|
83
|
+
// { where: { OR: [] } },
|
84
|
+
// );
|
85
|
+
// expect(res).toEqual(result);
|
86
|
+
// });
|
87
|
+
// });
|
88
|
+
// */
|
89
|
+
// /*
|
90
|
+
// describe('getRouteById', () => {
|
91
|
+
// it('should return a route by ID', async () => {
|
92
|
+
// const routeId = 1;
|
93
|
+
// const route = { id: routeId, url: '/test', method: 'GET' };
|
94
|
+
|
95
|
+
// mockPrismaService.route.findUnique.mockResolvedValue(route);
|
96
|
+
|
97
|
+
// const res = await service.getRouteById(routeId);
|
98
|
+
|
99
|
+
// expect(mockPrismaService.route.findUnique).toHaveBeenCalledWith({
|
100
|
+
// where: { id: routeId },
|
101
|
+
// });
|
102
|
+
// expect(res).toEqual(route);
|
103
|
+
// });
|
104
|
+
// });*/
|
105
|
+
|
106
|
+
// describe('create', () => {
|
107
|
+
// it('should create a new route', async () => {
|
108
|
+
// const createDto: CreateDTO = { url: '/test', method: 'GET' };
|
109
|
+
// const route = { id: 1, ...createDto };
|
110
|
+
|
111
|
+
// mockPrismaService.route.create.mockResolvedValue(route);
|
112
|
+
|
113
|
+
// const res = await service.create(createDto);
|
114
|
+
|
115
|
+
// expect(mockPrismaService.route.create).toHaveBeenCalledWith({
|
116
|
+
// data: createDto,
|
117
|
+
// });
|
118
|
+
// expect(res).toEqual(route);
|
119
|
+
// });
|
120
|
+
// });
|
121
|
+
|
122
|
+
// describe('update', () => {
|
123
|
+
// it('should update a route', async () => {
|
124
|
+
// const updateDto: UpdateDTO = { url: '/updated', method: 'POST' };
|
125
|
+
// const routeId = 1;
|
126
|
+
// const updatedRoute = { id: routeId, ...updateDto };
|
127
|
+
|
128
|
+
// mockPrismaService.route.update.mockResolvedValue(updatedRoute);
|
129
|
+
|
130
|
+
// const res = await service.update({ id: routeId, data: updateDto });
|
131
|
+
|
132
|
+
// expect(mockPrismaService.route.update).toHaveBeenCalledWith({
|
133
|
+
// where: { id: routeId },
|
134
|
+
// data: updateDto,
|
135
|
+
// });
|
136
|
+
// expect(res).toEqual(updatedRoute);
|
137
|
+
// });
|
138
|
+
// });
|
139
|
+
|
140
|
+
// describe('delete', () => {
|
141
|
+
// it('should delete route by ids', async () => {
|
142
|
+
// const deleteDto: DeleteDTO = { ids: [1, 2] };
|
143
|
+
// const result = { count: 2 };
|
144
|
+
|
145
|
+
// mockPrismaService.route.deleteMany.mockResolvedValue(result);
|
146
|
+
|
147
|
+
// const res = await service.delete(deleteDto);
|
148
|
+
|
149
|
+
// expect(mockPrismaService.route.deleteMany).toHaveBeenCalledWith({
|
150
|
+
// where: { id: { in: deleteDto.ids } },
|
151
|
+
// });
|
152
|
+
// expect(res).toEqual(result);
|
153
|
+
// });
|
154
|
+
// });
|
155
|
+
|
156
|
+
// describe('updateRoles', () => {
|
157
|
+
// it('should update role for a route', async () => {
|
158
|
+
// const routeId = 1;
|
159
|
+
// const updateIdsDto: UpdateIdsDTO = { ids: [1, 2] };
|
160
|
+
// const result = { count: 2 };
|
161
|
+
|
162
|
+
// mockPrismaService.role_route.deleteMany.mockResolvedValue({});
|
163
|
+
// mockPrismaService.role_route.createMany.mockResolvedValue(result);
|
164
|
+
|
165
|
+
// const res = await service.updateRoles(routeId, updateIdsDto);
|
166
|
+
|
167
|
+
// expect(mockPrismaService.role_route.deleteMany).toHaveBeenCalledWith({
|
168
|
+
// where: { route_id: routeId },
|
169
|
+
// });
|
170
|
+
// expect(mockPrismaService.role_route.createMany).toHaveBeenCalledWith({
|
171
|
+
// data: updateIdsDto.ids.map((roleId) => ({
|
172
|
+
// role_id: roleId,
|
173
|
+
// route_id: routeId,
|
174
|
+
// })),
|
175
|
+
// skipDuplicates: true,
|
176
|
+
// });
|
177
|
+
// expect(res).toEqual(result);
|
178
|
+
// });
|
179
|
+
// });
|
180
|
+
|
181
|
+
// describe('updateScreens', () => {
|
182
|
+
// it('should update screens for a route', async () => {
|
183
|
+
// const routeId = 1;
|
184
|
+
// const updateIdsDto: UpdateIdsDTO = { ids: [1, 2] };
|
185
|
+
// const result = { count: 2 };
|
186
|
+
|
187
|
+
// mockPrismaService.route_screens.deleteMany.mockResolvedValue({});
|
188
|
+
// mockPrismaService.route_screens.createMany.mockResolvedValue(result);
|
189
|
+
|
190
|
+
// const res = await service.updateScreens(routeId, updateIdsDto);
|
191
|
+
|
192
|
+
// expect(mockPrismaService.route_screens.deleteMany).toHaveBeenCalledWith({
|
193
|
+
// where: { route_id: routeId },
|
194
|
+
// });
|
195
|
+
// expect(mockPrismaService.route_screens.createMany).toHaveBeenCalledWith({
|
196
|
+
// data: updateIdsDto.ids.map((screenId) => ({
|
197
|
+
// screen_id: screenId,
|
198
|
+
// route_id: routeId,
|
199
|
+
// })),
|
200
|
+
// skipDuplicates: true,
|
201
|
+
// });
|
202
|
+
// expect(res).toEqual(result);
|
203
|
+
// });
|
204
|
+
// });
|
205
|
+
|
206
|
+
// describe('listRoles', () => {
|
207
|
+
// it('should call paginate method with correct parameters', async () => {
|
208
|
+
// const locale = 'en';
|
209
|
+
// const routeId = 1;
|
210
|
+
// const paginationParams: PaginationDTO = {
|
211
|
+
// page: 1,
|
212
|
+
// pageSize: 10,
|
213
|
+
// search: '',
|
214
|
+
// sortField: '',
|
215
|
+
// sortOrder: PageOrderDirection.Asc,
|
216
|
+
// fields: '',
|
217
|
+
// };
|
218
|
+
|
219
|
+
// paginationService.paginate = jest.fn().mockResolvedValue({
|
220
|
+
// data: [],
|
221
|
+
// total: 0,
|
222
|
+
// });
|
223
|
+
|
224
|
+
// await service.listRoles(locale, routeId, paginationParams);
|
225
|
+
|
226
|
+
// expect(paginationService.paginate).toHaveBeenCalledWith(
|
227
|
+
// prismaService.role,
|
228
|
+
// paginationParams,
|
229
|
+
// {
|
230
|
+
// include: {
|
231
|
+
// role_locale: {
|
232
|
+
// where: {
|
233
|
+
// locale: { code: locale },
|
234
|
+
// },
|
235
|
+
// select: {
|
236
|
+
// name: true,
|
237
|
+
// description: true,
|
238
|
+
// },
|
239
|
+
// },
|
240
|
+
// role_route: {
|
241
|
+
// where: { route_id: routeId },
|
242
|
+
// select: {
|
243
|
+
// route_id: true,
|
244
|
+
// role_id: true,
|
245
|
+
// },
|
246
|
+
// },
|
247
|
+
// },
|
248
|
+
// },
|
249
|
+
// 'role_locale',
|
250
|
+
// );
|
251
|
+
// });
|
252
|
+
// });
|
253
|
+
|
254
|
+
// describe('listScreens', () => {
|
255
|
+
// it('should call paginate method with correct parameters', async () => {
|
256
|
+
// const locale = 'en';
|
257
|
+
// const routeId = 1;
|
258
|
+
// const paginationParams: PaginationDTO = {
|
259
|
+
// page: 1,
|
260
|
+
// pageSize: 10,
|
261
|
+
// search: '',
|
262
|
+
// sortField: '',
|
263
|
+
// sortOrder: PageOrderDirection.Asc,
|
264
|
+
// fields: '',
|
265
|
+
// };
|
266
|
+
|
267
|
+
// paginationService.paginate = jest.fn().mockResolvedValue({
|
268
|
+
// data: [],
|
269
|
+
// total: 0,
|
270
|
+
// });
|
271
|
+
|
272
|
+
// await service.listScreens(locale, routeId, paginationParams);
|
273
|
+
|
274
|
+
// expect(paginationService.paginate).toHaveBeenCalledWith(
|
275
|
+
// prismaService.screens,
|
276
|
+
// paginationParams,
|
277
|
+
// {
|
278
|
+
// include: {
|
279
|
+
// screen_locale: {
|
280
|
+
// where: {
|
281
|
+
// locale: { code: locale },
|
282
|
+
// },
|
283
|
+
// select: {
|
284
|
+
// name: true,
|
285
|
+
// },
|
286
|
+
// },
|
287
|
+
// route_screens: {
|
288
|
+
// where: { route_id: routeId },
|
289
|
+
// select: {
|
290
|
+
// route_id: true,
|
291
|
+
// screen_id: true,
|
292
|
+
// },
|
293
|
+
// },
|
294
|
+
// },
|
295
|
+
// },
|
296
|
+
// 'screen_locale',
|
297
|
+
// );
|
298
|
+
// });
|
299
|
+
// });
|
300
|
+
// });
|
@@ -1,18 +1,10 @@
|
|
1
1
|
import { IsNotEmpty, IsString } from 'class-validator';
|
2
2
|
|
3
3
|
export class CreateDTO {
|
4
|
-
@IsString({ message: 'O nome deve ser uma string' })
|
5
|
-
@IsNotEmpty({ message: 'O nome é obrigatório.' })
|
6
|
-
name: string;
|
7
|
-
|
8
4
|
@IsString({ message: 'O slug deve ser uma string' })
|
9
5
|
@IsNotEmpty({ message: 'O slug é obrigatório.' })
|
10
6
|
slug: string;
|
11
7
|
|
12
|
-
@IsString({ message: 'A descrição deve ser uma string' })
|
13
|
-
@IsNotEmpty({ message: 'A descrição é obrigatória.' })
|
14
|
-
description: string;
|
15
|
-
|
16
8
|
@IsString({ message: 'O ícone deve ser uma string' })
|
17
9
|
@IsNotEmpty({ message: 'A descrição é obrigatória.' })
|
18
10
|
icon?: string;
|
@@ -14,7 +14,7 @@ import {
|
|
14
14
|
import { DeleteDTO } from '../dto/delete.dto';
|
15
15
|
import { UpdateIdsDTO } from '../dto/update-ids.dto';
|
16
16
|
import { Locale } from '@hedhog/locale';
|
17
|
-
import { Role } from '@hedhog/
|
17
|
+
import { Role } from '@hedhog/core';
|
18
18
|
import { CreateDTO } from './dto/create.dto';
|
19
19
|
import { UpdateDTO } from './dto/update.dto';
|
20
20
|
import { ScreenService } from './screen.service';
|