Modifiche

This commit is contained in:
Lorenzo Sanesi
2026-04-01 23:49:19 +02:00
parent 8752acd2c4
commit e2fe8b264f
52 changed files with 1351 additions and 400 deletions
@@ -5,6 +5,15 @@ class UsersController {
this.usersService = usersService;
}
async getCurrentUser(req, res, next) {
try {
const user = await this.usersService.getUserById(req.userId);
return ResponseHandler.success(res, user, 'User retrieved successfully');
} catch (error) {
next(error);
}
}
async updateCurrentUser(req, res, next) {
try {
const user = await this.usersService.updateUserProfile(req.userId, req.body);