Skip to content

Commit

Permalink
fix: fix emailService.sendCode not returning error.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeqwaszx committed Jan 9, 2025
1 parent 242dff5 commit c244b2c
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import org.springframework.beans.factory.annotation.Value
import org.springframework.http.ResponseCookie
import org.springframework.http.ResponseEntity
import org.springframework.web.bind.annotation.*
import java.util.concurrent.CompletableFuture

@RestController
@RequestMapping("/api/user")
Expand All @@ -22,8 +23,10 @@ class UserController(
fun sendCode(
@RequestBody request: SendCodeRequest,
): ResponseEntity<Void> {
// 이메일 코드 전송
emailService.sendCode(request.snuMail)
CompletableFuture.runAsync {
emailService.sendCode(request.snuMail)
}.join()

return ResponseEntity.ok().build()
}

Expand Down

0 comments on commit c244b2c

Please sign in to comment.