@hedhog/admin 0.0.122 → 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/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,251 +1,262 @@
|
|
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
|
-
|
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
|
-
|
2
|
+
// import {
|
3
|
+
// PageOrderDirection,
|
4
|
+
// PaginationDTO,
|
5
|
+
// PaginationService,
|
6
|
+
// } from '@hedhog/pagination';
|
7
|
+
// import { PrismaService } from '@hedhog/prisma';
|
8
|
+
// import { Test, TestingModule } from '@nestjs/testing';
|
9
|
+
// import { DeleteDTO } from '../dto/delete.dto';
|
10
|
+
// import { UpdateIdsDTO } from '../dto/update-ids.dto';
|
11
|
+
// import { CreateDTO } from './dto/create.dto';
|
12
|
+
// import { UpdateDTO } from './dto/update.dto';
|
13
|
+
// import { RouteService } from './route.service';
|
14
|
+
// describe('RouteService', () => {
|
15
|
+
// let service: RouteService;
|
16
|
+
// let prismaService: PrismaService;
|
17
|
+
// let paginationService: PaginationService;
|
18
|
+
// const mockPrismaService = {
|
19
|
+
// route: {
|
20
|
+
// findUnique: jest.fn(),
|
21
|
+
// create: jest.fn(),
|
22
|
+
// update: jest.fn(),
|
23
|
+
// deleteMany: jest.fn(),
|
24
|
+
// },
|
25
|
+
// role_route: {
|
26
|
+
// deleteMany: jest.fn(),
|
27
|
+
// createMany: jest.fn(),
|
28
|
+
// },
|
29
|
+
// route_screens: {
|
30
|
+
// deleteMany: jest.fn(),
|
31
|
+
// createMany: jest.fn(),
|
32
|
+
// },
|
33
|
+
// createInsensitiveSearch: jest.fn(),
|
34
|
+
// };
|
35
|
+
// const mockPaginationService = {
|
36
|
+
// paginate: jest.fn(),
|
37
|
+
// };
|
38
|
+
// beforeEach(async () => {
|
39
|
+
// const module: TestingModule = await Test.createTestingModule({
|
40
|
+
// providers: [
|
41
|
+
// RouteService,
|
42
|
+
// { provide: PrismaService, useValue: mockPrismaService },
|
43
|
+
// { provide: PaginationService, useValue: mockPaginationService },
|
44
|
+
// ],
|
45
|
+
// }).compile();
|
46
|
+
// service = module.get<RouteService>(RouteService);
|
47
|
+
// prismaService = module.get<PrismaService>(PrismaService);
|
48
|
+
// paginationService = module.get<PaginationService>(PaginationService);
|
49
|
+
// });
|
50
|
+
// it('should be defined', () => {
|
51
|
+
// expect(service).toBeDefined();
|
52
|
+
// });
|
53
|
+
// /*
|
54
|
+
// describe('getRoutes', () => {
|
55
|
+
// it('should paginate route', async () => {
|
56
|
+
// const paginationParams: PaginationDTO = {
|
57
|
+
// page: 1,
|
58
|
+
// pageSize: 10,
|
59
|
+
// search: '',
|
60
|
+
// sortField: '',
|
61
|
+
// sortOrder: PageOrderDirection.Asc,
|
62
|
+
// fields: '',
|
63
|
+
// };
|
64
|
+
// const result = { data: [], total: 0 };
|
65
|
+
// mockPrismaService.createInsensitiveSearch.mockReturnValue([]);
|
66
|
+
// mockPaginationService.paginate.mockResolvedValue(result);
|
67
|
+
// const res = await service.getRoutes(paginationParams);
|
68
|
+
// expect(mockPrismaService.createInsensitiveSearch).toHaveBeenCalledWith(
|
69
|
+
// ['url', 'method'],
|
70
|
+
// paginationParams,
|
71
|
+
// );
|
72
|
+
// expect(mockPaginationService.paginate).toHaveBeenCalledWith(
|
73
|
+
// mockPrismaService.route,
|
74
|
+
// paginationParams,
|
75
|
+
// { where: { OR: [] } },
|
76
|
+
// );
|
77
|
+
// expect(res).toEqual(result);
|
78
|
+
// });
|
79
|
+
// });
|
80
|
+
// */
|
81
|
+
// /*
|
82
|
+
// describe('getRouteById', () => {
|
83
|
+
// it('should return a route by ID', async () => {
|
84
|
+
// const routeId = 1;
|
85
|
+
// const route = { id: routeId, url: '/test', method: 'GET' };
|
86
|
+
// mockPrismaService.route.findUnique.mockResolvedValue(route);
|
87
|
+
// const res = await service.getRouteById(routeId);
|
88
|
+
// expect(mockPrismaService.route.findUnique).toHaveBeenCalledWith({
|
89
|
+
// where: { id: routeId },
|
90
|
+
// });
|
91
|
+
// expect(res).toEqual(route);
|
92
|
+
// });
|
93
|
+
// });*/
|
94
|
+
// describe('create', () => {
|
95
|
+
// it('should create a new route', async () => {
|
96
|
+
// const createDto: CreateDTO = { url: '/test', method: 'GET' };
|
97
|
+
// const route = { id: 1, ...createDto };
|
98
|
+
// mockPrismaService.route.create.mockResolvedValue(route);
|
99
|
+
// const res = await service.create(createDto);
|
100
|
+
// expect(mockPrismaService.route.create).toHaveBeenCalledWith({
|
101
|
+
// data: createDto,
|
102
|
+
// });
|
103
|
+
// expect(res).toEqual(route);
|
104
|
+
// });
|
105
|
+
// });
|
106
|
+
// describe('update', () => {
|
107
|
+
// it('should update a route', async () => {
|
108
|
+
// const updateDto: UpdateDTO = { url: '/updated', method: 'POST' };
|
109
|
+
// const routeId = 1;
|
110
|
+
// const updatedRoute = { id: routeId, ...updateDto };
|
111
|
+
// mockPrismaService.route.update.mockResolvedValue(updatedRoute);
|
112
|
+
// const res = await service.update({ id: routeId, data: updateDto });
|
113
|
+
// expect(mockPrismaService.route.update).toHaveBeenCalledWith({
|
114
|
+
// where: { id: routeId },
|
115
|
+
// data: updateDto,
|
116
|
+
// });
|
117
|
+
// expect(res).toEqual(updatedRoute);
|
118
|
+
// });
|
119
|
+
// });
|
120
|
+
// describe('delete', () => {
|
121
|
+
// it('should delete route by ids', async () => {
|
122
|
+
// const deleteDto: DeleteDTO = { ids: [1, 2] };
|
123
|
+
// const result = { count: 2 };
|
124
|
+
// mockPrismaService.route.deleteMany.mockResolvedValue(result);
|
125
|
+
// const res = await service.delete(deleteDto);
|
126
|
+
// expect(mockPrismaService.route.deleteMany).toHaveBeenCalledWith({
|
127
|
+
// where: { id: { in: deleteDto.ids } },
|
128
|
+
// });
|
129
|
+
// expect(res).toEqual(result);
|
130
|
+
// });
|
131
|
+
// });
|
132
|
+
// describe('updateRoles', () => {
|
133
|
+
// it('should update role for a route', async () => {
|
134
|
+
// const routeId = 1;
|
135
|
+
// const updateIdsDto: UpdateIdsDTO = { ids: [1, 2] };
|
136
|
+
// const result = { count: 2 };
|
137
|
+
// mockPrismaService.role_route.deleteMany.mockResolvedValue({});
|
138
|
+
// mockPrismaService.role_route.createMany.mockResolvedValue(result);
|
139
|
+
// const res = await service.updateRoles(routeId, updateIdsDto);
|
140
|
+
// expect(mockPrismaService.role_route.deleteMany).toHaveBeenCalledWith({
|
141
|
+
// where: { route_id: routeId },
|
142
|
+
// });
|
143
|
+
// expect(mockPrismaService.role_route.createMany).toHaveBeenCalledWith({
|
144
|
+
// data: updateIdsDto.ids.map((roleId) => ({
|
145
|
+
// role_id: roleId,
|
146
|
+
// route_id: routeId,
|
147
|
+
// })),
|
148
|
+
// skipDuplicates: true,
|
149
|
+
// });
|
150
|
+
// expect(res).toEqual(result);
|
151
|
+
// });
|
152
|
+
// });
|
153
|
+
// describe('updateScreens', () => {
|
154
|
+
// it('should update screens for a route', async () => {
|
155
|
+
// const routeId = 1;
|
156
|
+
// const updateIdsDto: UpdateIdsDTO = { ids: [1, 2] };
|
157
|
+
// const result = { count: 2 };
|
158
|
+
// mockPrismaService.route_screens.deleteMany.mockResolvedValue({});
|
159
|
+
// mockPrismaService.route_screens.createMany.mockResolvedValue(result);
|
160
|
+
// const res = await service.updateScreens(routeId, updateIdsDto);
|
161
|
+
// expect(mockPrismaService.route_screens.deleteMany).toHaveBeenCalledWith({
|
162
|
+
// where: { route_id: routeId },
|
163
|
+
// });
|
164
|
+
// expect(mockPrismaService.route_screens.createMany).toHaveBeenCalledWith({
|
165
|
+
// data: updateIdsDto.ids.map((screenId) => ({
|
166
|
+
// screen_id: screenId,
|
167
|
+
// route_id: routeId,
|
168
|
+
// })),
|
169
|
+
// skipDuplicates: true,
|
170
|
+
// });
|
171
|
+
// expect(res).toEqual(result);
|
172
|
+
// });
|
173
|
+
// });
|
174
|
+
// describe('listRoles', () => {
|
175
|
+
// it('should call paginate method with correct parameters', async () => {
|
176
|
+
// const locale = 'en';
|
177
|
+
// const routeId = 1;
|
178
|
+
// const paginationParams: PaginationDTO = {
|
179
|
+
// page: 1,
|
180
|
+
// pageSize: 10,
|
181
|
+
// search: '',
|
182
|
+
// sortField: '',
|
183
|
+
// sortOrder: PageOrderDirection.Asc,
|
184
|
+
// fields: '',
|
185
|
+
// };
|
186
|
+
// paginationService.paginate = jest.fn().mockResolvedValue({
|
187
|
+
// data: [],
|
188
|
+
// total: 0,
|
189
|
+
// });
|
190
|
+
// await service.listRoles(locale, routeId, paginationParams);
|
191
|
+
// expect(paginationService.paginate).toHaveBeenCalledWith(
|
192
|
+
// prismaService.role,
|
193
|
+
// paginationParams,
|
194
|
+
// {
|
195
|
+
// include: {
|
196
|
+
// role_locale: {
|
197
|
+
// where: {
|
198
|
+
// locale: { code: locale },
|
199
|
+
// },
|
200
|
+
// select: {
|
201
|
+
// name: true,
|
202
|
+
// description: true,
|
203
|
+
// },
|
204
|
+
// },
|
205
|
+
// role_route: {
|
206
|
+
// where: { route_id: routeId },
|
207
|
+
// select: {
|
208
|
+
// route_id: true,
|
209
|
+
// role_id: true,
|
210
|
+
// },
|
211
|
+
// },
|
212
|
+
// },
|
213
|
+
// },
|
214
|
+
// 'role_locale',
|
215
|
+
// );
|
216
|
+
// });
|
217
|
+
// });
|
218
|
+
// describe('listScreens', () => {
|
219
|
+
// it('should call paginate method with correct parameters', async () => {
|
220
|
+
// const locale = 'en';
|
221
|
+
// const routeId = 1;
|
222
|
+
// const paginationParams: PaginationDTO = {
|
223
|
+
// page: 1,
|
224
|
+
// pageSize: 10,
|
225
|
+
// search: '',
|
226
|
+
// sortField: '',
|
227
|
+
// sortOrder: PageOrderDirection.Asc,
|
228
|
+
// fields: '',
|
229
|
+
// };
|
230
|
+
// paginationService.paginate = jest.fn().mockResolvedValue({
|
231
|
+
// data: [],
|
232
|
+
// total: 0,
|
233
|
+
// });
|
234
|
+
// await service.listScreens(locale, routeId, paginationParams);
|
235
|
+
// expect(paginationService.paginate).toHaveBeenCalledWith(
|
236
|
+
// prismaService.screens,
|
237
|
+
// paginationParams,
|
238
|
+
// {
|
239
|
+
// include: {
|
240
|
+
// screen_locale: {
|
241
|
+
// where: {
|
242
|
+
// locale: { code: locale },
|
243
|
+
// },
|
244
|
+
// select: {
|
245
|
+
// name: true,
|
246
|
+
// },
|
247
|
+
// },
|
248
|
+
// route_screens: {
|
249
|
+
// where: { route_id: routeId },
|
250
|
+
// select: {
|
251
|
+
// route_id: true,
|
252
|
+
// screen_id: true,
|
253
|
+
// },
|
254
|
+
// },
|
255
|
+
// },
|
256
|
+
// },
|
257
|
+
// 'screen_locale',
|
258
|
+
// );
|
259
|
+
// });
|
260
|
+
// });
|
261
|
+
// });
|
251
262
|
//# sourceMappingURL=route.service.spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"route.service.spec.js","sourceRoot":"","sources":["../../src/route/route.service.spec.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"route.service.spec.js","sourceRoot":"","sources":["../../src/route/route.service.spec.ts"],"names":[],"mappings":";AAAA,WAAW;AACX,wBAAwB;AACxB,mBAAmB;AACnB,uBAAuB;AACvB,+BAA+B;AAC/B,kDAAkD;AAClD,yDAAyD;AACzD,iDAAiD;AACjD,wDAAwD;AACxD,gDAAgD;AAChD,gDAAgD;AAChD,kDAAkD;AAElD,mCAAmC;AACnC,+BAA+B;AAC/B,sCAAsC;AACtC,8CAA8C;AAE9C,gCAAgC;AAChC,eAAe;AACf,+BAA+B;AAC/B,2BAA2B;AAC3B,2BAA2B;AAC3B,+BAA+B;AAC/B,SAAS;AACT,oBAAoB;AACpB,+BAA+B;AAC/B,+BAA+B;AAC/B,SAAS;AACT,uBAAuB;AACvB,+BAA+B;AAC/B,+BAA+B;AAC/B,SAAS;AACT,0CAA0C;AAC1C,OAAO;AAEP,oCAAoC;AACpC,2BAA2B;AAC3B,OAAO;AAEP,6BAA6B;AAC7B,qEAAqE;AACrE,qBAAqB;AACrB,wBAAwB;AACxB,mEAAmE;AACnE,2EAA2E;AAC3E,WAAW;AACX,oBAAoB;AAEpB,wDAAwD;AACxD,gEAAgE;AAChE,4EAA4E;AAC5E,QAAQ;AAER,oCAAoC;AACpC,qCAAqC;AACrC,QAAQ;AACR,OAAO;AACP,kCAAkC;AAClC,gDAAgD;AAChD,kDAAkD;AAClD,mBAAmB;AACnB,wBAAwB;AACxB,sBAAsB;AACtB,yBAAyB;AACzB,6CAA6C;AAC7C,sBAAsB;AACtB,WAAW;AACX,+CAA+C;AAE/C,uEAAuE;AACvE,kEAAkE;AAElE,+DAA+D;AAE/D,gFAAgF;AAChF,6BAA6B;AAC7B,4BAA4B;AAC5B,WAAW;AACX,qEAAqE;AACrE,mCAAmC;AACnC,4BAA4B;AAC5B,iCAAiC;AACjC,WAAW;AACX,qCAAqC;AAC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1B,kCAAkC;AAClC,mCAAmC;AACnC,mBAAmB;AACnB,iBAAiB;AACjB,eAAe;AACf,aAAa;AACb,2BAA2B;AAC3B,WAAW;AACX,UAAU;AACV,QAAQ;AACR,MAAM"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/screen/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;IAIb,IAAI,
|
1
|
+
{"version":3,"file":"create.dto.d.ts","sourceRoot":"","sources":["../../../src/screen/dto/create.dto.ts"],"names":[],"mappings":"AAEA,qBAAa,SAAS;IAGpB,IAAI,EAAE,MAAM,CAAC;IAIb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
|
@@ -14,21 +14,11 @@ const class_validator_1 = require("class-validator");
|
|
14
14
|
class CreateDTO {
|
15
15
|
}
|
16
16
|
exports.CreateDTO = CreateDTO;
|
17
|
-
__decorate([
|
18
|
-
(0, class_validator_1.IsString)({ message: 'O nome deve ser uma string' }),
|
19
|
-
(0, class_validator_1.IsNotEmpty)({ message: 'O nome é obrigatório.' }),
|
20
|
-
__metadata("design:type", String)
|
21
|
-
], CreateDTO.prototype, "name", void 0);
|
22
17
|
__decorate([
|
23
18
|
(0, class_validator_1.IsString)({ message: 'O slug deve ser uma string' }),
|
24
19
|
(0, class_validator_1.IsNotEmpty)({ message: 'O slug é obrigatório.' }),
|
25
20
|
__metadata("design:type", String)
|
26
21
|
], CreateDTO.prototype, "slug", void 0);
|
27
|
-
__decorate([
|
28
|
-
(0, class_validator_1.IsString)({ message: 'A descrição deve ser uma string' }),
|
29
|
-
(0, class_validator_1.IsNotEmpty)({ message: 'A descrição é obrigatória.' }),
|
30
|
-
__metadata("design:type", String)
|
31
|
-
], CreateDTO.prototype, "description", void 0);
|
32
22
|
__decorate([
|
33
23
|
(0, class_validator_1.IsString)({ message: 'O ícone deve ser uma string' }),
|
34
24
|
(0, class_validator_1.IsNotEmpty)({ message: 'A descrição é obrigatória.' }),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/screen/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,SAAS;
|
1
|
+
{"version":3,"file":"create.dto.js","sourceRoot":"","sources":["../../../src/screen/dto/create.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAuD;AAEvD,MAAa,SAAS;CAQrB;AARD,8BAQC;AALC;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;IACnD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAAC;;uCACpC;AAIb;IAFC,IAAA,0BAAQ,EAAC,EAAE,OAAO,EAAE,6BAA6B,EAAE,CAAC;IACpD,IAAA,4BAAU,EAAC,EAAE,OAAO,EAAE,4BAA4B,EAAE,CAAC;;uCACxC"}
|