@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
@@ -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 { RoleService } from './role.service';
|
@@ -57,7 +57,7 @@ export class RoleController {
|
|
57
57
|
return this.roleService.listRoutes(roleId, paginationParams);
|
58
58
|
}
|
59
59
|
|
60
|
-
@Get(':roleId/
|
60
|
+
@Get(':roleId/screen')
|
61
61
|
async listScreens(
|
62
62
|
@Pagination() paginationParams,
|
63
63
|
@Param('roleId', ParseIntPipe) roleId: number,
|
@@ -90,7 +90,7 @@ export class RoleController {
|
|
90
90
|
return this.roleService.updateRoutes(roleId, data);
|
91
91
|
}
|
92
92
|
|
93
|
-
@Patch(':roleId/
|
93
|
+
@Patch(':roleId/screen')
|
94
94
|
async updateScreens(
|
95
95
|
@Param('roleId', ParseIntPipe) roleId: number,
|
96
96
|
@Body() data: UpdateIdsDTO,
|
package/src/role/role.service.ts
CHANGED
@@ -259,29 +259,16 @@ export class RoleService {
|
|
259
259
|
);
|
260
260
|
}
|
261
261
|
|
262
|
-
async create({ slug
|
263
|
-
return this.localeService.createModelWithLocale(
|
264
|
-
|
265
|
-
|
266
|
-
{ slug },
|
267
|
-
locale,
|
268
|
-
);
|
262
|
+
async create({ slug }: CreateDTO) {
|
263
|
+
return this.localeService.createModelWithLocale('role', 'role_id', {
|
264
|
+
slug,
|
265
|
+
});
|
269
266
|
}
|
270
267
|
|
271
|
-
async update({
|
272
|
-
id,
|
273
|
-
|
274
|
-
|
275
|
-
id: number;
|
276
|
-
data: UpdateDTO;
|
277
|
-
}) {
|
278
|
-
return this.localeService.updateModelWithLocale(
|
279
|
-
'role',
|
280
|
-
'role_id',
|
281
|
-
id,
|
282
|
-
{ slug },
|
283
|
-
locale,
|
284
|
-
);
|
268
|
+
async update({ id, data: { slug } }: { id: number; data: UpdateDTO }) {
|
269
|
+
return this.localeService.updateModelWithLocale('role', 'role_id', id, {
|
270
|
+
slug,
|
271
|
+
});
|
285
272
|
}
|
286
273
|
|
287
274
|
async delete({ ids }: DeleteDTO) {
|
@@ -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 { RouteService } from './route.service';
|