Skip to content

Commit

Permalink
✨ AuthController 작성 및 회원가입 api 등록
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuuuuuk committed Oct 10, 2023
1 parent 0817e43 commit 91c7d75
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package andreas311.miso.domain.auth.presentation

import andreas311.miso.domain.auth.presentation.data.request.SignUpRequest
import andreas311.miso.domain.auth.service.SignUpService
import andreas311.miso.global.annotation.RequestController
import org.springframework.http.HttpStatus
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody

@RequestController("/auth")
class AuthController(
private val signUpService: SignUpService
) {

@PostMapping
fun signUp(@RequestBody signUpRequest: SignUpRequest): ResponseEntity<Void> =
signUpService.execute(signUpRequest)
.let { ResponseEntity.status(HttpStatus.CREATED).build() }
}

0 comments on commit 91c7d75

Please sign in to comment.