Skip to content

Commit

Permalink
feat: use lambda accessor to authenticate API caller
Browse files Browse the repository at this point in the history
  • Loading branch information
woowabrie committed Oct 10, 2023
1 parent 92731fc commit 8bb541f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/kotlin/apply/ui/api/MailRestController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import apply.application.mail.MailData
import apply.application.mail.MailMessageService
import apply.application.mail.MailService
import apply.domain.user.User
import apply.security.Accessor
import apply.security.LoginUser
import org.springframework.core.io.ByteArrayResource
import org.springframework.http.ResponseEntity
Expand Down Expand Up @@ -32,7 +33,7 @@ class MailRestController(

@PostMapping("/reserved")
fun sendMail(
@LoginUser(administrator = true) user: User
@Accessor("lambda") ignored: Unit
): ResponseEntity<Unit> {
mailMessageService.sendReservedMail()
return ResponseEntity.noContent().build()
Expand Down

0 comments on commit 8bb541f

Please sign in to comment.