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 /
auth /
Delete
Unzip
Name
Size
Permission
Date
Action
dto
[ DIR ]
drwxrwxrwx
2025-03-22 07:46
entities
[ DIR ]
drwxrwxrwx
2025-03-22 07:46
auth.controller.d.ts
542
B
-rw-rw-rw-
2025-03-22 07:46
auth.controller.js
4.6
KB
-rw-rw-rw-
2025-03-22 07:46
auth.controller.js.map
2.34
KB
-rw-rw-rw-
2025-03-22 07:46
auth.module.d.ts
36
B
-rw-rw-rw-
2025-03-22 07:46
auth.module.js
2.11
KB
-rw-rw-rw-
2025-03-22 07:46
auth.module.js.map
817
B
-rw-rw-rw-
2025-03-22 07:46
auth.service.d.ts
848
B
-rw-rw-rw-
2025-03-22 07:46
auth.service.js
4.42
KB
-rw-rw-rw-
2025-03-22 07:46
auth.service.js.map
2.66
KB
-rw-rw-rw-
2025-03-22 07:46
jwt-auth.guard.d.ts
349
B
-rw-rw-rw-
2025-03-22 07:46
jwt-auth.guard.js
2
KB
-rw-rw-rw-
2025-03-22 07:46
jwt-auth.guard.js.map
968
B
-rw-rw-rw-
2025-03-22 07:46
jwt.strategy.d.ts
926
B
-rw-rw-rw-
2025-03-22 07:46
jwt.strategy.js
3.24
KB
-rw-rw-rw-
2025-03-22 07:46
jwt.strategy.js.map
1.65
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.AuthController = void 0; const common_1 = require("@nestjs/common"); const auth_service_1 = require("./auth.service"); const jwt_auth_guard_1 = require("../../common/guards/jwt-auth.guard"); const login_dto_1 = require("./dto/login.dto"); const update_user_dto_1 = require("../users/dto/update-user.dto"); const swagger_1 = require("@nestjs/swagger"); const user_entity_1 = require("../users/entities/user.entity"); let AuthController = class AuthController { authService; constructor(authService) { this.authService = authService; } async login(loginDto) { return this.authService.login(loginDto.email, loginDto.password); } async logout(req) { const token = req.headers.authorization?.replace('Bearer ', ''); if (!token) { throw new Error('Token not provided'); } return this.authService.logout(token); } async updateProfile(req, updateData) { return this.authService.updateProfile(req.user.sub, updateData); } async authUser(req) { return this.authService.authUser(req.user.sub); } }; exports.AuthController = AuthController; __decorate([ (0, common_1.Post)('login'), (0, common_1.HttpCode)(common_1.HttpStatus.OK), (0, swagger_1.ApiOperation)({ summary: 'User login' }), (0, swagger_1.ApiBody)({ type: login_dto_1.LoginDto }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Login successful', type: Object }), __param(0, (0, common_1.Body)()), __metadata("design:type", Function), __metadata("design:paramtypes", [login_dto_1.LoginDto]), __metadata("design:returntype", Promise) ], AuthController.prototype, "login", null); __decorate([ (0, common_1.Post)('logout'), (0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)(), (0, swagger_1.ApiOperation)({ summary: 'User logout' }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Logout successful' }), __param(0, (0, common_1.Request)()), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise) ], AuthController.prototype, "logout", null); __decorate([ (0, common_1.Patch)('profile'), (0, common_1.HttpCode)(200), (0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)(), (0, swagger_1.ApiOperation)({ summary: 'Update user profile' }), (0, swagger_1.ApiBody)({ type: update_user_dto_1.UpdateUserDto }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Profile updated', type: user_entity_1.User }), __param(0, (0, common_1.Request)()), __param(1, (0, common_1.Body)()), __metadata("design:type", Function), __metadata("design:paramtypes", [Object, update_user_dto_1.UpdateUserDto]), __metadata("design:returntype", Promise) ], AuthController.prototype, "updateProfile", null); __decorate([ (0, common_1.Get)('user'), (0, common_1.UseGuards)(jwt_auth_guard_1.JwtAuthGuard), (0, swagger_1.ApiBearerAuth)(), (0, swagger_1.ApiOperation)({ summary: 'Get authenticated user' }), (0, swagger_1.ApiResponse)({ status: 200, description: 'Authenticated user', type: user_entity_1.User }), __param(0, (0, common_1.Request)()), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", Promise) ], AuthController.prototype, "authUser", null); exports.AuthController = AuthController = __decorate([ (0, swagger_1.ApiTags)('auth'), (0, common_1.Controller)('auth'), __metadata("design:paramtypes", [auth_service_1.AuthService]) ], AuthController); //# sourceMappingURL=auth.controller.js.map