Linux sg77.dns-private.com 5.14.0-503.40.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Mon May 5 06:06:04 EDT 2025 x86_64
LiteSpeed
Server IP : 135.181.230.13 & Your IP : 216.73.217.69
Domains :
Cant Read [ /etc/named.conf ]
User : pilasate
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
pilasate /
test /
dist /
modules /
roles /
Delete
Unzip
Name
Size
Permission
Date
Action
dto
[ DIR ]
drwxrwxrwx
2025-03-22 07:46
entities
[ DIR ]
drwxrwxrwx
2025-03-22 07:46
roles.controller.d.ts
591
B
-rw-rw-rw-
2025-03-22 07:46
roles.controller.js
5.42
KB
-rw-rw-rw-
2025-03-22 07:46
roles.controller.js.map
2.98
KB
-rw-rw-rw-
2025-03-22 07:46
roles.module.d.ts
37
B
-rw-rw-rw-
2025-03-22 07:46
roles.module.js
1.31
KB
-rw-rw-rw-
2025-03-22 07:46
roles.module.js.map
450
B
-rw-rw-rw-
2025-03-22 07:46
roles.service.d.ts
558
B
-rw-rw-rw-
2025-03-22 07:46
roles.service.js
3.89
KB
-rw-rw-rw-
2025-03-22 07:46
roles.service.js.map
2.46
KB
-rw-rw-rw-
2025-03-22 07:46
Save
Rename
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); 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; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; Object.defineProperty(exports, "__esModule", { value: true }); exports.RolesController = void 0; const common_1 = require("@nestjs/common"); const roles_service_1 = require("./roles.service"); const create_role_dto_1 = require("./dto/create-role.dto"); const update_role_dto_1 = require("./dto/update-role.dto"); const role_entity_1 = require("./entities/role.entity"); const swagger_1 = require("@nestjs/swagger"); let RolesController = class RolesController { rolesService; constructor(rolesService) { this.rolesService = rolesService; } async findAll() { return this.rolesService.findAll(); } async findOne(id) { return this.rolesService.findOne(id); } async create(createRoleDto) { return this.rolesService.create(createRoleDto); } async update(id, updateRoleDto) { const role = await this.rolesService.update(id, updateRoleDto); if (!role) throw new common_1.NotFoundException(`Role with ID ${id} not found`); return role; } async delete(id) { const role = await this.rolesService.findOne(id); if (!role) throw new common_1.NotFoundException(`Role with ID ${id} not found`); await this.rolesService.delete(id); return { message: `Role with ID ${id} deleted successfully` }; } }; exports.RolesController = RolesController; __decorate([ (0, common_1.Get)(), (0, swagger_1.ApiOperation)({ summary: 'Get all roles' }), (0, swagger_1.ApiResponse)({ status: 200, description: 'List of roles', type: [role_entity_1.Role] }), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", Promise) ], RolesController.prototype, "findAll", null); __decorate([ (0, common_1.Get)(':id'), (0, swagger_1.ApiOperation)({ summary: 'Get one Role' }), (0, swagger_1.ApiParam)({ name: 'id', description: 'Role ID', example: '550e8400-e29b-41d4-a716-446655440012' }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Role found', type: role_entity_1.Role }), (0, swagger_1.ApiResponse)({ status: 404, description: 'Role not found' }), __param(0, (0, common_1.Param)('id')), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", Promise) ], RolesController.prototype, "findOne", null); __decorate([ (0, common_1.Post)(), (0, swagger_1.ApiOperation)({ summary: 'Create a new role' }), (0, swagger_1.ApiBody)({ type: create_role_dto_1.CreateRoleDto }), (0, swagger_1.ApiResponse)({ status: 201, description: 'Role created', type: role_entity_1.Role }), __param(0, (0, common_1.Body)()), __metadata("design:type", Function), __metadata("design:paramtypes", [create_role_dto_1.CreateRoleDto]), __metadata("design:returntype", Promise) ], RolesController.prototype, "create", null); __decorate([ (0, common_1.Put)(':id'), (0, swagger_1.ApiOperation)({ summary: 'Update an existing role' }), (0, swagger_1.ApiParam)({ name: 'id', description: 'Role ID', example: '550e8400-e29b-41d4-a716-446655440012' }), (0, swagger_1.ApiBody)({ type: update_role_dto_1.UpdateRoleDto }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Role updated', type: role_entity_1.Role }), (0, swagger_1.ApiResponse)({ status: 404, description: 'Role not found' }), __param(0, (0, common_1.Param)('id')), __param(1, (0, common_1.Body)()), __metadata("design:type", Function), __metadata("design:paramtypes", [String, update_role_dto_1.UpdateRoleDto]), __metadata("design:returntype", Promise) ], RolesController.prototype, "update", null); __decorate([ (0, common_1.Delete)(':id'), (0, common_1.HttpCode)(200), (0, swagger_1.ApiOperation)({ summary: 'Delete a role' }), (0, swagger_1.ApiParam)({ name: 'id', description: 'Role ID', example: '550e8400-e29b-41d4-a716-446655440012' }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Role deleted', type: Object }), (0, swagger_1.ApiResponse)({ status: 404, description: 'Role not found' }), __param(0, (0, common_1.Param)('id')), __metadata("design:type", Function), __metadata("design:paramtypes", [String]), __metadata("design:returntype", Promise) ], RolesController.prototype, "delete", null); exports.RolesController = RolesController = __decorate([ (0, swagger_1.ApiBearerAuth)(), (0, common_1.Controller)('roles'), __metadata("design:paramtypes", [roles_service_1.RolesService]) ], RolesController); //# sourceMappingURL=roles.controller.js.map