mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-28 07:51:02 +00:00
refactor( iam ): migrate session, logout, and guards to IAM
This commit is contained in:
@@ -68,9 +68,8 @@ export class AuthController {
|
||||
@ApiResponse({ status: 200, description: 'Logout successful' })
|
||||
@ApiResponse({ status: 401, description: 'Unauthorized' })
|
||||
logout(@Request() req: any) {
|
||||
const userId = req.user?.id ?? req.user?.userId;
|
||||
if (!userId) throw new UnauthorizedException('User not authenticated');
|
||||
return this.service.logout(userId);
|
||||
if (!req.user?.id) throw new UnauthorizedException('User not authenticated');
|
||||
return this.passengerAuthService.logout(req.user, req);
|
||||
}
|
||||
|
||||
@Get('me')
|
||||
|
||||
Reference in New Issue
Block a user