Skip to content

Commit

Permalink
♻️ refactor: api 명세 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
sieunie committed Nov 21, 2024
1 parent 8850d2a commit 7e7188b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions BE/src/asset/asset.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ export class AssetController {
@ApiResponse({
status: 200,
description: '매도 가능 주식 개수 조회 성공',
example: { quantity: 0 },
})
async getUserStockByCode(
@Req() request: Request,
Expand All @@ -48,6 +49,7 @@ export class AssetController {
@ApiResponse({
status: 200,
description: '매수 가능 금액 조회 성공',
example: { cash_balance: 0 },
})
async getCashBalance(@Req() request: Request) {
return this.assetService.getCashBalance(parseInt(request.user.userId, 10));
Expand Down
7 changes: 6 additions & 1 deletion BE/src/auth/auth.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
UnauthorizedException,
} from '@nestjs/common';
import { AuthGuard } from '@nestjs/passport';
import { ApiOperation } from '@nestjs/swagger';
import { ApiOperation, ApiResponse } from '@nestjs/swagger';
import { Request, Response } from 'express';
import { ConfigService } from '@nestjs/config';
import { AuthService } from './auth.service';
Expand Down Expand Up @@ -84,6 +84,11 @@ export class AuthController {
@ApiOperation({ summary: '로그인 상태 확인 API' })
@Get('/check')
@UseGuards(AuthGuard('jwt'))
@ApiResponse({
status: 200,
description: '로그인 상태 조회 성공',
example: { isLogin: true },
})
check() {
return { isLogin: true };
}
Expand Down

0 comments on commit 7e7188b

Please sign in to comment.