refactor( iam ): migrate session, logout, and guards to IAM

This commit is contained in:
Abubeker Yasin
2026-06-06 08:58:42 +03:00
parent d06debf1ca
commit 023522c3fb
7 changed files with 53 additions and 190 deletions

View File

@@ -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')