From 6f23fa743e2beec5b1722fd6c54b2df738c0a305 Mon Sep 17 00:00:00 2001 From: woowabrie Date: Tue, 10 Oct 2023 17:02:59 +0900 Subject: [PATCH] feat: use lambda accessor to authenticate API caller --- src/main/kotlin/apply/ui/api/MailRestController.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/apply/ui/api/MailRestController.kt b/src/main/kotlin/apply/ui/api/MailRestController.kt index 496ad0723..e9b7ea277 100644 --- a/src/main/kotlin/apply/ui/api/MailRestController.kt +++ b/src/main/kotlin/apply/ui/api/MailRestController.kt @@ -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 @@ -32,7 +33,7 @@ class MailRestController( @PostMapping("/reserved") fun sendMail( - @LoginUser(administrator = true) user: User + @Accessor("lambda") ignored: Unit ): ResponseEntity { mailMessageService.sendReservedMail() return ResponseEntity.noContent().build()