Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
dkdltmqpdj committed Sep 6, 2023
1 parent 5675fba commit 50a8bcb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/sign/sign.controller.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Body, Controller, Delete, Post, UseGuards } from '@nestjs/common'
import { Body, Controller, Delete, Post, UploadedFile, UseGuards, UseInterceptors } from '@nestjs/common'
import { UserDto } from '../dto/user.dto'
import { SignService } from './sign.service'
import { ApiBearerAuth, ApiOperation, ApiResponse, ApiSecurity, ApiTags } from '@nestjs/swagger'
import { JwtAuthGuard } from '../guard/AuthGuard'
import { FileInterceptor } from '@nestjs/platform-express'

@ApiBearerAuth()
@ApiSecurity('basic')
Expand All @@ -20,10 +21,11 @@ export class SignController {
status: 401,
description: '서버 에러',
})
@UseInterceptors(FileInterceptor('file'))
@ApiOperation({ summary: '회원가입' })
@Post('up')
signUp(@Body() body: UserDto) {
return this.signService.sign_up({ ...body, img: 'default.jpg', score: 100 })
signUp(@UploadedFile() file: Array<Express.Multer.File>, @Body() body: UserDto) {
return this.signService.sign_up({ ...body, img: 'default.jpg', score: 100, group: [] })
}

@ApiResponse({
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 50a8bcb

Please sign in to comment.