Implement 'getMe' endpoint in AdminController to retrieve current admin details; update AdminService to return transformed admin details and adjust findById method for improved data handling. Remove unused user profile retrieval method from AdminUserController.

This commit is contained in:
2025-11-18 10:58:28 +03:30
parent 1010c8d20a
commit 2da66cdd86
4 changed files with 85 additions and 19 deletions
@@ -19,6 +19,14 @@ export class AdminController {
return admin;
}
@Get('me')
@ApiOperation({ summary: 'admin' })
@ApiResponse({ status: 201, description: 'Admins' })
async getMe() {
const admin = await this.adminService.findAll();
return admin;
}
@Post()
@HttpCode(HttpStatus.CREATED)
@ApiOperation({ summary: 'Create a new admin' })