replaced logout api guard with session auth guard

This commit is contained in:
Muhsin Shah 2024-03-06 23:07:08 +05:30
parent 810edb028a
commit 693d869d23

View file

@ -101,7 +101,7 @@ export class AppController {
return await this.authService.generateSessionPayload(user, currentOrganization);
}
@UseGuards(JwtAuthGuard)
@UseGuards(SessionAuthGuard)
@Get('logout')
async terminateUserSession(@User() user, @Res({ passthrough: true }) response: Response) {
await this.sessionService.terminateSession(user.id, user.sessionId, response);