Skip to content

Commit

Permalink
πŸš‘ !HOTFIX : 둜그인 λ˜μ§€ μ•Šμ€ μƒνƒœμ—μ„œ 200 status, isLogin False 둜 μ‘λ‹΅ν•˜κ²Œ λ³€κ²½
Browse files Browse the repository at this point in the history
  • Loading branch information
jinddings committed Dec 3, 2024
1 parent 1b38bff commit 1b1f8fa
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions BE/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import { Request, Response } from 'express';
import { ConfigService } from '@nestjs/config';
import { AuthService } from './auth.service';
import { AuthCredentialsDto } from './dto/auth-credentials.dto';
import { OptionalAuthGuard } from './optional-auth-guard';

@Controller('/api/auth')
export class AuthController {
Expand Down Expand Up @@ -83,13 +84,14 @@ export class AuthController {

@ApiOperation({ summary: '둜그인 μƒνƒœ 확인 API' })
@Get('/check')
@UseGuards(AuthGuard('jwt'))
@UseGuards(OptionalAuthGuard)
@ApiResponse({
status: 200,
description: '둜그인 μƒνƒœ 쑰회 성곡',
example: { isLogin: true },
})
check() {
check(@Req() req: Request) {
if (!req.user) return { isLogin: false };
return { isLogin: true };
}

Expand Down

0 comments on commit 1b1f8fa

Please sign in to comment.