@hedhog/admin 0.0.20 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
Files changed (80) hide show
  1. package/dist/admin.module.d.ts.map +1 -1
  2. package/dist/admin.module.js +10 -1
  3. package/dist/admin.module.js.map +1 -1
  4. package/dist/dto/delete.dto.d.ts.map +1 -0
  5. package/dist/dto/delete.dto.js.map +1 -0
  6. package/dist/menu/menu.controller.d.ts +3 -3
  7. package/dist/menu/menu.controller.d.ts.map +1 -1
  8. package/dist/menu/menu.controller.js +9 -7
  9. package/dist/menu/menu.controller.js.map +1 -1
  10. package/dist/menu/menu.service.d.ts +3 -3
  11. package/dist/menu/menu.service.d.ts.map +1 -1
  12. package/dist/menu/menu.service.js +18 -10
  13. package/dist/menu/menu.service.js.map +1 -1
  14. package/dist/role/role.controller.d.ts +5 -5
  15. package/dist/role/role.controller.d.ts.map +1 -1
  16. package/dist/role/role.controller.js +21 -17
  17. package/dist/role/role.controller.js.map +1 -1
  18. package/dist/role/role.service.d.ts +5 -5
  19. package/dist/role/role.service.d.ts.map +1 -1
  20. package/dist/role/role.service.js +52 -12
  21. package/dist/role/role.service.js.map +1 -1
  22. package/dist/route/dto/create.dto.d.ts +6 -0
  23. package/dist/route/dto/create.dto.d.ts.map +1 -0
  24. package/dist/{screen/dto/delete.dto.js → route/dto/create.dto.js} +14 -9
  25. package/dist/route/dto/create.dto.js.map +1 -0
  26. package/dist/route/dto/update.dto.d.ts +6 -0
  27. package/dist/route/dto/update.dto.d.ts.map +1 -0
  28. package/dist/{menu/dto/delete.dto.js → route/dto/update.dto.js} +16 -10
  29. package/dist/route/dto/update.dto.js.map +1 -0
  30. package/dist/route/route.controller.d.ts +20 -0
  31. package/dist/route/route.controller.d.ts.map +1 -0
  32. package/dist/route/route.controller.js +133 -0
  33. package/dist/route/route.controller.js.map +1 -0
  34. package/dist/route/route.module.d.ts +3 -0
  35. package/dist/route/route.module.d.ts.map +1 -0
  36. package/dist/route/route.module.js +31 -0
  37. package/dist/route/route.module.js.map +1 -0
  38. package/dist/route/route.service.d.ts +24 -0
  39. package/dist/route/route.service.d.ts.map +1 -0
  40. package/dist/route/route.service.js +121 -0
  41. package/dist/route/route.service.js.map +1 -0
  42. package/dist/screen/screen.controller.d.ts +3 -3
  43. package/dist/screen/screen.controller.d.ts.map +1 -1
  44. package/dist/screen/screen.controller.js +9 -7
  45. package/dist/screen/screen.controller.js.map +1 -1
  46. package/dist/screen/screen.service.d.ts +4 -4
  47. package/dist/screen/screen.service.d.ts.map +1 -1
  48. package/dist/screen/screen.service.js +34 -16
  49. package/dist/screen/screen.service.js.map +1 -1
  50. package/dist/types/http-method.d.ts +2 -0
  51. package/dist/types/http-method.d.ts.map +1 -0
  52. package/dist/types/http-method.js +3 -0
  53. package/dist/types/http-method.js.map +1 -0
  54. package/dist/user/user.controller.d.ts +1 -1
  55. package/dist/user/user.controller.d.ts.map +1 -1
  56. package/dist/user/user.controller.js +1 -1
  57. package/dist/user/user.controller.js.map +1 -1
  58. package/dist/user/user.service.d.ts +1 -1
  59. package/dist/user/user.service.d.ts.map +1 -1
  60. package/dist/user/user.service.js +2 -2
  61. package/dist/user/user.service.js.map +1 -1
  62. package/package.json +1 -1
  63. package/src/migrations/migrate-02.ts +6 -0
  64. package/src/migrations/migrate-03.ts +9 -1
  65. package/src/migrations/migrate-04.ts +52 -0
  66. package/src/migrations/migrate-12.ts +8 -0
  67. package/dist/menu/dto/delete.dto.d.ts.map +0 -1
  68. package/dist/menu/dto/delete.dto.js.map +0 -1
  69. package/dist/role/dto/delete.dto.d.ts +0 -4
  70. package/dist/role/dto/delete.dto.d.ts.map +0 -1
  71. package/dist/role/dto/delete.dto.js.map +0 -1
  72. package/dist/screen/dto/delete.dto.d.ts +0 -4
  73. package/dist/screen/dto/delete.dto.d.ts.map +0 -1
  74. package/dist/screen/dto/delete.dto.js.map +0 -1
  75. package/dist/user/dto/delete.dto.d.ts +0 -4
  76. package/dist/user/dto/delete.dto.d.ts.map +0 -1
  77. package/dist/user/dto/delete.dto.js +0 -23
  78. package/dist/user/dto/delete.dto.js.map +0 -1
  79. /package/dist/{menu/dto → dto}/delete.dto.d.ts +0 -0
  80. /package/dist/{role/dto → dto}/delete.dto.js +0 -0
@@ -0,0 +1,20 @@
1
+ import { PaginationDTO } from '@hedhog/pagination';
2
+ import { RouteService } from './route.service';
3
+ import { CreateDTO } from './dto/create.dto';
4
+ import { UpdateDTO } from './dto/update.dto';
5
+ import { DeleteDTO } from '../dto/delete.dto';
6
+ import { UpdateIdsDTO } from '../dto/update-ids.dto';
7
+ export declare class RouteController {
8
+ private readonly routeService;
9
+ constructor(routeService: RouteService);
10
+ getRoutes(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ getRouteById(routeId: number): Promise<any>;
12
+ create({ url, method }: CreateDTO): Promise<any>;
13
+ update(routeId: number, data: UpdateDTO): Promise<any>;
14
+ delete(data: DeleteDTO): Promise<any>;
15
+ listRoles(routeId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
16
+ updateRoles(routeId: number, data: UpdateIdsDTO): Promise<any>;
17
+ listScreens(routeId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
18
+ updateScreens(routeId: number, data: UpdateIdsDTO): Promise<any>;
19
+ }
20
+ //# sourceMappingURL=route.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.controller.d.ts","sourceRoot":"","sources":["../../src/route/route.controller.ts"],"names":[],"mappings":"AAeA,OAAO,EAAc,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAGa,eAAe;IAGxB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBAAZ,YAAY,EAAE,YAAY;IAIvC,SAAS,CAAe,gBAAgB,KAAA;IAKxC,YAAY,CAAiC,OAAO,EAAE,MAAM;IAK5D,MAAM,CAAS,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS;IAKzC,MAAM,CACsB,OAAO,EAAE,MAAM,EACvC,IAAI,EAAE,SAAS;IAMnB,MAAM,CAAS,IAAI,EAAE,SAAS;IAK9B,SAAS,CACmB,OAAO,EAAE,MAAM,EACjC,gBAAgB,EAAE,aAAa;IAMzC,WAAW,CACiB,OAAO,EAAE,MAAM,EACvC,IAAI,EAAE,YAAY;IAMtB,WAAW,CACiB,OAAO,EAAE,MAAM,EACjC,gBAAgB,EAAE,aAAa;IAMzC,aAAa,CACe,OAAO,EAAE,MAAM,EACvC,IAAI,EAAE,YAAY;CAI7B"}
@@ -0,0 +1,133 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RouteController = void 0;
16
+ const common_1 = require("@nestjs/common");
17
+ const role_decorator_1 = require("../role/decorators/role.decorator");
18
+ const auth_guard_1 = require("../auth/guards/auth.guard");
19
+ const pagination_1 = require("@hedhog/pagination");
20
+ const route_service_1 = require("./route.service");
21
+ const create_dto_1 = require("./dto/create.dto");
22
+ const update_dto_1 = require("./dto/update.dto");
23
+ const delete_dto_1 = require("../dto/delete.dto");
24
+ const update_ids_dto_1 = require("../dto/update-ids.dto");
25
+ let RouteController = class RouteController {
26
+ constructor(routeService) {
27
+ this.routeService = routeService;
28
+ }
29
+ async getRoutes(paginationParams) {
30
+ return this.routeService.getRoutes(paginationParams);
31
+ }
32
+ async getRouteById(routeId) {
33
+ return this.routeService.getRouteById(routeId);
34
+ }
35
+ async create({ url, method }) {
36
+ return this.routeService.create({ url, method });
37
+ }
38
+ async update(routeId, data) {
39
+ return this.routeService.update({ id: routeId, data });
40
+ }
41
+ async delete(data) {
42
+ return this.routeService.delete(data);
43
+ }
44
+ async listRoles(routeId, paginationParams) {
45
+ return this.routeService.listRoles(routeId, paginationParams);
46
+ }
47
+ async updateRoles(routeId, data) {
48
+ return this.routeService.updateRoles(routeId, data);
49
+ }
50
+ async listScreens(routeId, paginationParams) {
51
+ return this.routeService.listScreens(routeId, paginationParams);
52
+ }
53
+ async updateScreens(routeId, data) {
54
+ return this.routeService.updateScreens(routeId, data);
55
+ }
56
+ };
57
+ exports.RouteController = RouteController;
58
+ __decorate([
59
+ (0, common_1.Get)(),
60
+ __param(0, (0, pagination_1.Pagination)()),
61
+ __metadata("design:type", Function),
62
+ __metadata("design:paramtypes", [Object]),
63
+ __metadata("design:returntype", Promise)
64
+ ], RouteController.prototype, "getRoutes", null);
65
+ __decorate([
66
+ (0, common_1.Get)(':routeId'),
67
+ __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
68
+ __metadata("design:type", Function),
69
+ __metadata("design:paramtypes", [Number]),
70
+ __metadata("design:returntype", Promise)
71
+ ], RouteController.prototype, "getRouteById", null);
72
+ __decorate([
73
+ (0, common_1.Post)(),
74
+ __param(0, (0, common_1.Body)()),
75
+ __metadata("design:type", Function),
76
+ __metadata("design:paramtypes", [create_dto_1.CreateDTO]),
77
+ __metadata("design:returntype", Promise)
78
+ ], RouteController.prototype, "create", null);
79
+ __decorate([
80
+ (0, common_1.Patch)(':routeId'),
81
+ __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
82
+ __param(1, (0, common_1.Body)()),
83
+ __metadata("design:type", Function),
84
+ __metadata("design:paramtypes", [Number, update_dto_1.UpdateDTO]),
85
+ __metadata("design:returntype", Promise)
86
+ ], RouteController.prototype, "update", null);
87
+ __decorate([
88
+ (0, common_1.Delete)(),
89
+ __param(0, (0, common_1.Body)()),
90
+ __metadata("design:type", Function),
91
+ __metadata("design:paramtypes", [delete_dto_1.DeleteDTO]),
92
+ __metadata("design:returntype", Promise)
93
+ ], RouteController.prototype, "delete", null);
94
+ __decorate([
95
+ (0, common_1.Get)(':routeId/roles'),
96
+ __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
97
+ __param(1, (0, pagination_1.Pagination)()),
98
+ __metadata("design:type", Function),
99
+ __metadata("design:paramtypes", [Number, pagination_1.PaginationDTO]),
100
+ __metadata("design:returntype", Promise)
101
+ ], RouteController.prototype, "listRoles", null);
102
+ __decorate([
103
+ (0, common_1.Patch)(':routeId/roles'),
104
+ __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
105
+ __param(1, (0, common_1.Body)()),
106
+ __metadata("design:type", Function),
107
+ __metadata("design:paramtypes", [Number, update_ids_dto_1.UpdateIdsDTO]),
108
+ __metadata("design:returntype", Promise)
109
+ ], RouteController.prototype, "updateRoles", null);
110
+ __decorate([
111
+ (0, common_1.Get)(':routeId/screens'),
112
+ __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
113
+ __param(1, (0, pagination_1.Pagination)()),
114
+ __metadata("design:type", Function),
115
+ __metadata("design:paramtypes", [Number, pagination_1.PaginationDTO]),
116
+ __metadata("design:returntype", Promise)
117
+ ], RouteController.prototype, "listScreens", null);
118
+ __decorate([
119
+ (0, common_1.Patch)(':routeId/screens'),
120
+ __param(0, (0, common_1.Param)('routeId', common_1.ParseIntPipe)),
121
+ __param(1, (0, common_1.Body)()),
122
+ __metadata("design:type", Function),
123
+ __metadata("design:paramtypes", [Number, update_ids_dto_1.UpdateIdsDTO]),
124
+ __metadata("design:returntype", Promise)
125
+ ], RouteController.prototype, "updateScreens", null);
126
+ exports.RouteController = RouteController = __decorate([
127
+ (0, role_decorator_1.Role)(),
128
+ (0, common_1.UseGuards)(auth_guard_1.AuthGuard),
129
+ (0, common_1.Controller)('routes'),
130
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => route_service_1.RouteService))),
131
+ __metadata("design:paramtypes", [route_service_1.RouteService])
132
+ ], RouteController);
133
+ //# sourceMappingURL=route.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.controller.js","sourceRoot":"","sources":["../../src/route/route.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAYwB;AACxB,sEAAyD;AACzD,0DAAsD;AACtD,mDAA+D;AAC/D,mDAA+C;AAC/C,iDAA6C;AAC7C,iDAA6C;AAC7C,kDAA8C;AAC9C,0DAAqD;AAK9C,IAAM,eAAe,GAArB,MAAM,eAAe;IAC1B,YAEmB,YAA0B;QAA1B,iBAAY,GAAZ,YAAY,CAAc;IAC1C,CAAC;IAGE,AAAN,KAAK,CAAC,SAAS,CAAe,gBAAgB;QAC5C,OAAO,IAAI,CAAC,YAAY,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC;IACvD,CAAC;IAGK,AAAN,KAAK,CAAC,YAAY,CAAiC,OAAe;QAChE,OAAO,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAGK,AAAN,KAAK,CAAC,MAAM,CAAS,EAAE,GAAG,EAAE,MAAM,EAAa;QAC7C,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,EAAE,GAAG,EAAE,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L=route.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.module.d.ts","sourceRoot":"","sources":["../../src/route/route.module.ts"],"names":[],"mappings":"AAOA,qBAUa,WAAW;CAAG"}
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.RouteModule = void 0;
10
+ const pagination_1 = require("@hedhog/pagination");
11
+ const prisma_1 = require("@hedhog/prisma");
12
+ const common_1 = require("@nestjs/common");
13
+ const route_controller_1 = require("./route.controller");
14
+ const route_service_1 = require("./route.service");
15
+ const auth_module_1 = require("../auth/auth.module");
16
+ let RouteModule = class RouteModule {
17
+ };
18
+ exports.RouteModule = RouteModule;
19
+ exports.RouteModule = RouteModule = __decorate([
20
+ (0, common_1.Module)({
21
+ providers: [route_service_1.RouteService],
22
+ exports: [route_service_1.RouteService],
23
+ controllers: [route_controller_1.RouteController],
24
+ imports: [
25
+ (0, common_1.forwardRef)(() => auth_module_1.AuthModule),
26
+ (0, common_1.forwardRef)(() => prisma_1.PrismaModule),
27
+ (0, common_1.forwardRef)(() => pagination_1.PaginationModule),
28
+ ],
29
+ })
30
+ ], RouteModule);
31
+ //# sourceMappingURL=route.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.module.js","sourceRoot":"","sources":["../../src/route/route.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,mDAAsD;AACtD,2CAA8C;AAC9C,2CAAoD;AACpD,yDAAqD;AACrD,mDAA+C;AAC/C,qDAAiD;AAY1C,IAAM,WAAW,GAAjB,MAAM,WAAW;CAAG,CAAA;AAAd,kCAAW;sBAAX,WAAW;IAVvB,IAAA,eAAM,EAAC;QACN,SAAS,EAAE,CAAC,4BAAY,CAAC;QACzB,OAAO,EAAE,CAAC,4BAAY,CAAC;QACvB,WAAW,EAAE,CAAC,kCAAe,CAAC;QAC9B,OAAO,EAAE;YACP,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,wBAAU,CAAC;YAC5B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,qBAAY,CAAC;YAC9B,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,6BAAgB,CAAC;SACnC;KACF,CAAC;GACW,WAAW,CAAG"}
@@ -0,0 +1,24 @@
1
+ import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
+ import { PrismaService } from '@hedhog/prisma';
3
+ import { UpdateDTO } from './dto/update.dto';
4
+ import { CreateDTO } from './dto/create.dto';
5
+ import { DeleteDTO } from '../dto/delete.dto';
6
+ import { UpdateIdsDTO } from '../dto/update-ids.dto';
7
+ export declare class RouteService {
8
+ private readonly prismaService;
9
+ private readonly paginationService;
10
+ constructor(prismaService: PrismaService, paginationService: PaginationService);
11
+ getRoutes(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
12
+ getRouteById(routeId: number): Promise<any>;
13
+ create({ url, method }: CreateDTO): Promise<any>;
14
+ update({ id, data }: {
15
+ id: number;
16
+ data: UpdateDTO;
17
+ }): Promise<any>;
18
+ delete({ ids }: DeleteDTO): Promise<any>;
19
+ listRoles(routeId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
20
+ updateRoles(routeId: number, data: UpdateIdsDTO): Promise<any>;
21
+ listScreens(routeId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
22
+ updateScreens(routeId: number, data: UpdateIdsDTO): Promise<any>;
23
+ }
24
+ //# sourceMappingURL=route.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.service.d.ts","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBACa,YAAY;IAGrB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,SAAS,CAAC,gBAAgB,EAAE,aAAa;IAmBzC,YAAY,CAAC,OAAO,EAAE,MAAM;IAI5B,MAAM,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,SAAS;IAIjC,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;IAUzB,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAoB1D,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAgB/C,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAoB5D,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;CAexD"}
@@ -0,0 +1,121 @@
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
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.RouteService = void 0;
16
+ const pagination_1 = require("@hedhog/pagination");
17
+ const prisma_1 = require("@hedhog/prisma");
18
+ const common_1 = require("@nestjs/common");
19
+ let RouteService = class RouteService {
20
+ constructor(prismaService, paginationService) {
21
+ this.prismaService = prismaService;
22
+ this.paginationService = paginationService;
23
+ }
24
+ async getRoutes(paginationParams) {
25
+ const fields = ['url', 'method'];
26
+ const OR = this.prismaService.createInsensitiveSearch(fields, paginationParams);
27
+ return this.paginationService.paginate(this.prismaService.routes, paginationParams, {
28
+ where: {
29
+ OR,
30
+ },
31
+ });
32
+ }
33
+ async getRouteById(routeId) {
34
+ return this.prismaService.routes.findUnique({ where: { id: routeId } });
35
+ }
36
+ async create({ url, method }) {
37
+ return this.prismaService.routes.create({ data: { url, method } });
38
+ }
39
+ async update({ id, data }) {
40
+ return this.prismaService.routes.update({
41
+ where: { id },
42
+ data,
43
+ });
44
+ }
45
+ async delete({ ids }) {
46
+ return this.prismaService.routes.deleteMany({
47
+ where: {
48
+ id: {
49
+ in: ids,
50
+ },
51
+ },
52
+ });
53
+ }
54
+ async listRoles(routeId, paginationParams) {
55
+ return this.paginationService.paginate(this.prismaService.roles, paginationParams, {
56
+ include: {
57
+ role_routes: {
58
+ where: {
59
+ route_id: routeId,
60
+ },
61
+ select: {
62
+ route_id: true,
63
+ role_id: true,
64
+ },
65
+ },
66
+ },
67
+ });
68
+ }
69
+ async updateRoles(routeId, data) {
70
+ await this.prismaService.role_routes.deleteMany({
71
+ where: {
72
+ route_id: routeId,
73
+ },
74
+ });
75
+ return this.prismaService.role_routes.createMany({
76
+ data: data.ids.map((roleId) => ({
77
+ role_id: roleId,
78
+ route_id: routeId,
79
+ })),
80
+ skipDuplicates: true,
81
+ });
82
+ }
83
+ async listScreens(routeId, paginationParams) {
84
+ return this.paginationService.paginate(this.prismaService.screens, paginationParams, {
85
+ include: {
86
+ route_screens: {
87
+ where: {
88
+ route_id: routeId,
89
+ },
90
+ select: {
91
+ route_id: true,
92
+ screen_id: true,
93
+ },
94
+ },
95
+ },
96
+ });
97
+ }
98
+ async updateScreens(routeId, data) {
99
+ await this.prismaService.route_screens.deleteMany({
100
+ where: {
101
+ route_id: routeId,
102
+ },
103
+ });
104
+ return this.prismaService.route_screens.createMany({
105
+ data: data.ids.map((screenId) => ({
106
+ screen_id: screenId,
107
+ route_id: routeId,
108
+ })),
109
+ skipDuplicates: true,
110
+ });
111
+ }
112
+ };
113
+ exports.RouteService = RouteService;
114
+ exports.RouteService = RouteService = __decorate([
115
+ (0, common_1.Injectable)(),
116
+ __param(0, (0, common_1.Inject)((0, common_1.forwardRef)(() => prisma_1.PrismaService))),
117
+ __param(1, (0, common_1.Inject)((0, common_1.forwardRef)(() => pagination_1.PaginationService))),
118
+ __metadata("design:paramtypes", [prisma_1.PrismaService,
119
+ pagination_1.PaginationService])
120
+ ], RouteService);
121
+ //# sourceMappingURL=route.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.service.js","sourceRoot":"","sources":["../../src/route/route.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAAgE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AAa,CAAC,OAAe,EAAE,IAAkB;QACrD,MAAM,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC;YAChD,KAAK,EAAE;gBACL,QAAQ,EAAE,OAAO;aAClB;SACF,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,aAAa,CAAC,aAAa,CAAC,UAAU,CAAC;YACjD,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;gBAChC,SAAS,EAAE,QAAQ;gBACnB,QAAQ,EAAE,OAAO;aAClB,CAAC,CAAC;YACH,cAAc,EAAE,IAAI;SACrB,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AA3HY,oCAAY;uBAAZ,YAAY;IADxB,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,YAAY,CA2HxB"}
@@ -1,5 +1,5 @@
1
1
  import { CreateDTO } from './dto/create.dto';
2
- import { DeleteDTO } from './dto/delete.dto';
2
+ import { DeleteDTO } from '../dto/delete.dto';
3
3
  import { UpdateDTO } from './dto/update.dto';
4
4
  import { ScreenService } from './screen.service';
5
5
  import { UpdateIdsDTO } from '../dto/update-ids.dto';
@@ -7,8 +7,8 @@ export declare class ScreenController {
7
7
  private readonly screenService;
8
8
  constructor(screenService: ScreenService);
9
9
  getScreens(paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
10
- listRoles(screenId: number): Promise<any>;
11
- listRoutes(screenId: number): Promise<any>;
10
+ listRoles(screenId: number, paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
11
+ listRoutes(screenId: number, paginationParams: any): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
12
12
  updateRoles(screenId: number, data: UpdateIdsDTO): Promise<any>;
13
13
  updateRoutes(screenId: number, data: UpdateIdsDTO): Promise<any>;
14
14
  show(screenId: number): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"screen.controller.d.ts","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":"AAcA,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,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAGa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,UAAU,CAAe,gBAAgB,KAAA;IAKzC,SAAS,CAAkC,QAAQ,EAAE,MAAM;IAK3D,UAAU,CAAkC,QAAQ,EAAE,MAAM;IAK5D,WAAW,CACkB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,YAAY;IAMtB,YAAY,CACiB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,YAAY;IAMtB,IAAI,CAAkC,QAAQ,EAAE,MAAM;IAK5D,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CACuB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
1
+ {"version":3,"file":"screen.controller.d.ts","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAGa,gBAAgB;IAGzB,OAAO,CAAC,QAAQ,CAAC,aAAa;gBAAb,aAAa,EAAE,aAAa;IAIzC,UAAU,CAAe,gBAAgB,KAAA;IAKzC,SAAS,CACoB,QAAQ,EAAE,MAAM,EACnC,gBAAgB,KAAA;IAM1B,UAAU,CACmB,QAAQ,EAAE,MAAM,EACnC,gBAAgB,KAAA;IAM1B,WAAW,CACkB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,YAAY;IAMtB,YAAY,CACiB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,YAAY;IAMtB,IAAI,CAAkC,QAAQ,EAAE,MAAM;IAK5D,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CACuB,QAAQ,EAAE,MAAM,EACzC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -16,7 +16,7 @@ exports.ScreenController = void 0;
16
16
  const pagination_1 = require("@hedhog/pagination");
17
17
  const common_1 = require("@nestjs/common");
18
18
  const create_dto_1 = require("./dto/create.dto");
19
- const delete_dto_1 = require("./dto/delete.dto");
19
+ const delete_dto_1 = require("../dto/delete.dto");
20
20
  const update_dto_1 = require("./dto/update.dto");
21
21
  const screen_service_1 = require("./screen.service");
22
22
  const auth_guard_1 = require("../auth/guards/auth.guard");
@@ -29,11 +29,11 @@ let ScreenController = class ScreenController {
29
29
  async getScreens(paginationParams) {
30
30
  return this.screenService.getScreens(paginationParams);
31
31
  }
32
- async listRoles(screenId) {
33
- return this.screenService.listRoles(screenId);
32
+ async listRoles(screenId, paginationParams) {
33
+ return this.screenService.listRoles(screenId, paginationParams);
34
34
  }
35
- async listRoutes(screenId) {
36
- return this.screenService.listRoutes(screenId);
35
+ async listRoutes(screenId, paginationParams) {
36
+ return this.screenService.listRoutes(screenId, paginationParams);
37
37
  }
38
38
  async updateRoles(screenId, data) {
39
39
  return this.screenService.updateRoles(screenId, data);
@@ -68,15 +68,17 @@ __decorate([
68
68
  __decorate([
69
69
  (0, common_1.Get)(':screenId/roles'),
70
70
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
71
+ __param(1, (0, pagination_1.Pagination)()),
71
72
  __metadata("design:type", Function),
72
- __metadata("design:paramtypes", [Number]),
73
+ __metadata("design:paramtypes", [Number, Object]),
73
74
  __metadata("design:returntype", Promise)
74
75
  ], ScreenController.prototype, "listRoles", null);
75
76
  __decorate([
76
77
  (0, common_1.Get)(':screenId/routes'),
77
78
  __param(0, (0, common_1.Param)('screenId', common_1.ParseIntPipe)),
79
+ __param(1, (0, pagination_1.Pagination)()),
78
80
  __metadata("design:type", Function),
79
- __metadata("design:paramtypes", [Number]),
81
+ __metadata("design:paramtypes", [Number, Object]),
80
82
  __metadata("design:returntype", Promise)
81
83
  ], ScreenController.prototype, "listRoutes", null);
82
84
  __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"screen.controller.js","sourceRoot":"","sources":["../../src/screen/screen.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAgD;AAChD,2CAYwB;AACxB,iDAA6C;AAC7C,iDAA6C;AAC7C,iDAA6C;AAC7C,qDAAiD;AACjD,0DAAsD;AACtD,sEAAyD;AACzD,0DAAqD;AAK9C,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;IAC3B,YAEmB,aAA4B;QAA5B,kBAAa,GAAb,aAAa,CAAe;IAC5C,CAAC;IAGE,AAAN,KAAK,CAAC,UAAU,CAAe,gBAAgB;QAC7C,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IACzD,CAAC;IAGK,AAAN,KAAK,CAAC,SAAS,CAAkC,QAAgB;QAC/D,OAAO,IAAI,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,C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,WAAA,IAAA,cAAK,EAAC,UAAU,EAAE,qBAAY,CAAC,CAAA;IAC/B,WAAA,IAAA,aAAI,GAAE,CAAA;;6CAAO,sBAAS;;8CAMxB;AAGK;IADL,IAAA,eAAM,GAAE;IACK,WAAA,IAAA,aAAI,GAAE,CAAA;;qCAAO,sBAAS;;8CAEnC;2BAnEU,gBAAgB;IAH5B,IAAA,qBAAI,GAAE;IACN,IAAA,kBAAS,EAAC,sBAAS,CAAC;IACpB,IAAA,mBAAU,EAAC,SAAS,CAAC;IAGjB,WAAA,IAAA,eAAM,EAAC,IAAA,mBAAU,EAAC,GAAG,EAAE,CAAC,8BAAa,CAAC,CAAC,CAAA;qCACR,8BAAa;GAHpC,gBAAgB,CAoE5B"}
@@ -1,7 +1,7 @@
1
1
  import { PaginationDTO, PaginationService } from '@hedhog/pagination';
2
2
  import { PrismaService } from '@hedhog/prisma';
3
3
  import { CreateDTO } from './dto/create.dto';
4
- import { DeleteDTO } from './dto/delete.dto';
4
+ import { DeleteDTO } from '../dto/delete.dto';
5
5
  import { UpdateDTO } from './dto/update.dto';
6
6
  import { UpdateIdsDTO } from '../dto/update-ids.dto';
7
7
  export declare class ScreenService {
@@ -9,9 +9,9 @@ export declare class ScreenService {
9
9
  private readonly paginationService;
10
10
  constructor(prismaService: PrismaService, paginationService: PaginationService);
11
11
  updateRoles(screenId: number, data: UpdateIdsDTO): Promise<any>;
12
- updateRoutes(screenId: number, data: UpdateIdsDTO): Promise<any>;
13
- listRoutes(screenId: number): Promise<any>;
14
- listRoles(screenId: number): Promise<any>;
12
+ updateRoutes(screenId: number, { ids }: UpdateIdsDTO): Promise<any>;
13
+ listRoutes(screenId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
14
+ listRoles(screenId: number, paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
15
15
  getScreens(paginationParams: PaginationDTO): Promise<import("@hedhog/pagination").PaginatedResult<unknown>>;
16
16
  get(screenId: number): Promise<any>;
17
17
  create({ name, slug, description, icon }: CreateDTO): Promise<any>;
@@ -1 +1 @@
1
- {"version":3,"file":"screen.service.d.ts","sourceRoot":"","sources":["../../src/screen/screen.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,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAehD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAejD,UAAU,CAAC,QAAQ,EAAE,MAAM;IAW3B,SAAS,CAAC,QAAQ,EAAE,MAAM;IAY1B,UAAU,CAAC,gBAAgB,EAAE,aAAa;IAkB1C,GAAG,CAAC,QAAQ,EAAE,MAAM;IAIpB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,SAAS;IAWnD,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"}
1
+ {"version":3,"file":"screen.service.d.ts","sourceRoot":"","sources":["../../src/screen/screen.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,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBACa,aAAa;IAGtB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAE9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;gBAFjB,aAAa,EAAE,aAAa,EAE5B,iBAAiB,EAAE,iBAAiB;IAGjD,WAAW,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY;IAehD,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,YAAY;IA4BpD,UAAU,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAoB5D,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa;IAoB3D,UAAU,CAAC,gBAAgB,EAAE,aAAa;IAkB1C,GAAG,CAAC,QAAQ,EAAE,MAAM;IAIpB,MAAM,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,SAAS;IAWnD,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"}
@@ -35,37 +35,55 @@ let ScreenService = class ScreenService {
35
35
  skipDuplicates: true,
36
36
  });
37
37
  }
38
- async updateRoutes(screenId, data) {
39
- await this.prismaService.route_screeens.deleteMany({
38
+ async updateRoutes(screenId, { ids }) {
39
+ ids = (await this.prismaService.routes.findMany({
40
+ where: {
41
+ id: {
42
+ in: ids,
43
+ },
44
+ },
45
+ select: {
46
+ id: true,
47
+ },
48
+ })).map((route) => route.id);
49
+ await this.prismaService.route_screens.deleteMany({
40
50
  where: {
41
51
  screen_id: screenId,
42
52
  },
43
53
  });
44
- return this.prismaService.route_screeens.createMany({
45
- data: data.ids.map((routeId) => ({
54
+ return this.prismaService.route_screens.createMany({
55
+ data: ids.map((routeId) => ({
46
56
  screen_id: screenId,
47
57
  route_id: routeId,
48
58
  })),
49
59
  skipDuplicates: true,
50
60
  });
51
61
  }
52
- async listRoutes(screenId) {
53
- return this.prismaService.routes.findMany({
54
- where: {
55
- screens: {
56
- some: {
57
- id: screenId,
62
+ async listRoutes(screenId, paginationParams) {
63
+ return this.paginationService.paginate(this.prismaService.routes, paginationParams, {
64
+ include: {
65
+ route_screens: {
66
+ where: {
67
+ screen_id: screenId,
68
+ },
69
+ select: {
70
+ route_id: true,
71
+ screen_id: true,
58
72
  },
59
73
  },
60
74
  },
61
75
  });
62
76
  }
63
- async listRoles(screenId) {
64
- return this.prismaService.roles.findMany({
65
- where: {
66
- screens: {
67
- some: {
68
- id: screenId,
77
+ async listRoles(screenId, paginationParams) {
78
+ return this.paginationService.paginate(this.prismaService.roles, paginationParams, {
79
+ include: {
80
+ role_screens: {
81
+ where: {
82
+ screen_id: screenId,
83
+ },
84
+ select: {
85
+ role_id: true,
86
+ screen_id: true,
69
87
  },
70
88
  },
71
89
  },
@@ -1 +1 @@
1
- {"version":3,"file":"screen.service.js","sourceRoot":"","sources":["../../src/screen/screen.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,mDAAsE;AACtE,2CAA+C;AAC/C,2CAKwB;AAOjB,IAAM,aAAa,GAAnB,MAAM,aAAa;IACxB,YAEmB,aAA4B,EAE5B,iBAAoC;QAFpC,kBAAa,GAAb,aAAa,CAAe;QAE5B,sBAAiB,GAAj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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,gDAAgD,CACjD,CAAC;QACJ,CAAC;QAED,OAAO,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,UAAU,CAAC;YAC3C,KAAK,EAAE;gBACL,EAAE,EAAE;oBACF,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAlJY,sCAAa;wBAAb,aAAa;IADzB,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,aAAa,CAkJzB"}
@@ -0,0 +1,2 @@
1
+ export type HttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD';
2
+ //# sourceMappingURL=http-method.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-method.d.ts","sourceRoot":"","sources":["../../src/types/http-method.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAClB,KAAK,GACL,MAAM,GACN,KAAK,GACL,QAAQ,GACR,OAAO,GACP,SAAS,GACT,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=http-method.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"http-method.js","sourceRoot":"","sources":["../../src/types/http-method.ts"],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { CreateDTO } from './dto/create.dto';
2
- import { DeleteDTO } from './dto/delete.dto';
2
+ import { DeleteDTO } from '../dto/delete.dto';
3
3
  import { UpdateDTO } from './dto/update.dto';
4
4
  import { UserService } from './user.service';
5
5
  import { UpdateIdsDTO } from '../dto/update-ids.dto';
@@ -1 +1 @@
1
- {"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":"AAcA,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,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAGa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,QAAQ,CAAe,gBAAgB,KAAA;IAKvC,SAAS,CACkB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA;IAM1B,WAAW,CACgB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,YAAY;IAMtB,IAAI,CAAgC,MAAM,EAAE,MAAM;IAKxD,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
1
+ {"version":3,"file":"user.controller.d.ts","sourceRoot":"","sources":["../../src/user/user.controller.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAG7C,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD,qBAGa,cAAc;IAGvB,OAAO,CAAC,QAAQ,CAAC,WAAW;gBAAX,WAAW,EAAE,WAAW;IAIrC,QAAQ,CAAe,gBAAgB,KAAA;IAKvC,SAAS,CACkB,MAAM,EAAE,MAAM,EAC/B,gBAAgB,KAAA;IAM1B,WAAW,CACgB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,YAAY;IAMtB,IAAI,CAAgC,MAAM,EAAE,MAAM;IAKxD,MAAM,CAAS,IAAI,EAAE,SAAS;IAKxB,MAAM,CACqB,MAAM,EAAE,MAAM,EACrC,IAAI,EAAE,SAAS;IASnB,MAAM,CAAS,IAAI,EAAE,SAAS;CAGrC"}
@@ -16,7 +16,7 @@ exports.UserController = void 0;
16
16
  const pagination_1 = require("@hedhog/pagination");
17
17
  const common_1 = require("@nestjs/common");
18
18
  const create_dto_1 = require("./dto/create.dto");
19
- const delete_dto_1 = require("./dto/delete.dto");
19
+ const delete_dto_1 = require("../dto/delete.dto");
20
20
  const update_dto_1 = require("./dto/update.dto");
21
21
  const user_service_1 = require("./user.service");
22
22
  const auth_guard_1 = require("../auth/guards/auth.guard");