From 297b2f8144b71eb91f1faded96e3572842d694cd Mon Sep 17 00:00:00 2001 From: huuuunee Date: Wed, 10 Jul 2024 02:14:38 +0900 Subject: [PATCH] =?UTF-8?q?add:=20/verify=20API=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../authentication/AuthenticationWebAdapter.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt index 0671b476..e3d5aed4 100644 --- a/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt +++ b/sms-presentation/src/main/kotlin/team/msg/sms/domain/authentication/AuthenticationWebAdapter.kt @@ -32,8 +32,14 @@ class AuthenticationWebAdapter( private val createAuthenticationFormUseCase: CreateAuthenticationFormUseCase, private val queryStudentFormListUseCase: QueryStudentFormListUseCase, private val queryStudentAuthenticationFormDetailUseCase: QueryStudentAuthenticationFormDetailUseCase, - private val gradingAuthenticationFormUseCase: GradingAuthenticationFormUseCase + private val gradingAuthenticationFormUseCase: GradingAuthenticationFormUseCase, + private val queryAuthenticationVerifyUseCase: QueryAuthenticationVerifyUseCase ) { + @GetMapping("/verify") + fun verifyStudentAuthenticationForm(): ResponseEntity = + queryAuthenticationVerifyUseCase.execute() + .let { ResponseEntity.ok(it.toResponse()) } + @GetMapping("/form") fun queryAuthenticationForm(): ResponseEntity = queryAuthenticationFormUseCase.execute() @@ -248,6 +254,14 @@ class AuthenticationWebAdapter( content = content ) + private fun QueryAuthenticationVerifyResponseData.toResponse() = + QueryAuthenticationVerifyWebResponse( + name = name, + score = score, + grader = grader, + markingBoardType = markingBoardType + ) + private fun isValidUUID(uuid: String): Boolean { return try { UUID.fromString(uuid)