feat: remove OTP gate from transactions, fix categories auth, add implementation plan

- Remove OtpGateGuard from transactions controller (OTP verified at login)
- Fix categories controller to use authenticated user instead of TEMP_USER_ID
- Add comprehensive implementation plan document
- Update .env.example with WEB_APP_URL
- Prepare for admin dashboard development
This commit is contained in:
dwindown
2025-10-11 14:00:11 +07:00
parent 0da6071eb3
commit 249f3a9d7d
159 changed files with 13748 additions and 3369 deletions

View File

@@ -8,9 +8,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
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.UsersController = void 0;
const common_1 = require("@nestjs/common");
const auth_guard_1 = require("../auth/auth.guard");
const users_service_1 = require("./users.service");
let UsersController = class UsersController {
users;
@@ -20,6 +24,15 @@ let UsersController = class UsersController {
me() {
return this.users.me();
}
async updateProfile(req, body) {
return this.users.updateProfile(req.user.userId, body);
}
async getAuthInfo(req) {
return this.users.getAuthInfo(req.user.userId);
}
async deleteAccount(req, body) {
return this.users.deleteAccount(req.user.userId, body.password);
}
};
exports.UsersController = UsersController;
__decorate([
@@ -28,8 +41,32 @@ __decorate([
__metadata("design:paramtypes", []),
__metadata("design:returntype", void 0)
], UsersController.prototype, "me", null);
__decorate([
(0, common_1.Put)('profile'),
__param(0, (0, common_1.Req)()),
__param(1, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object]),
__metadata("design:returntype", Promise)
], UsersController.prototype, "updateProfile", null);
__decorate([
(0, common_1.Get)('auth-info'),
__param(0, (0, common_1.Req)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object]),
__metadata("design:returntype", Promise)
], UsersController.prototype, "getAuthInfo", null);
__decorate([
(0, common_1.Delete)('account'),
__param(0, (0, common_1.Req)()),
__param(1, (0, common_1.Body)()),
__metadata("design:type", Function),
__metadata("design:paramtypes", [Object, Object]),
__metadata("design:returntype", Promise)
], UsersController.prototype, "deleteAccount", null);
exports.UsersController = UsersController = __decorate([
(0, common_1.Controller)('users'),
(0, common_1.UseGuards)(auth_guard_1.AuthGuard),
__metadata("design:paramtypes", [users_service_1.UsersService])
], UsersController);
//# sourceMappingURL=users.controller.js.map