Skip to content

Commit fa71d6a

Browse files
committed
🧼 clean: http code 추가
1 parent 358287a commit fa71d6a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

server/src/file/controller/file.controller.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import {
88
Param,
99
UseGuards,
1010
BadRequestException,
11+
HttpStatus,
12+
HttpCode,
1113
} from '@nestjs/common';
1214
import { FileInterceptor } from '@nestjs/platform-express';
1315
import { FileService } from '../service/file.service';
@@ -27,6 +29,7 @@ export class FileController {
2729

2830
@Post('profile')
2931
@ApiUploadProfileFile()
32+
@HttpCode(HttpStatus.CREATED)
3033
@UseInterceptors(FileInterceptor('file', createDynamicStorage()))
3134
async upload(@UploadedFile() file: any, @Req() req) {
3235
if (!file) {
@@ -42,6 +45,7 @@ export class FileController {
4245
// TODO: 권한검사 추가
4346
@Delete(':id')
4447
@ApiDeleteFile()
48+
@HttpCode(HttpStatus.OK)
4549
async deleteFile(@Param() fileDeleteRequestDto: FileDeleteRequestDto) {
4650
await this.fileService.deleteFile(fileDeleteRequestDto.id);
4751
return ApiResponse.responseWithNoContent(

0 commit comments

Comments
 (0)