Skip to content

Commit

Permalink
add: /verify API 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
Huuuunee committed Jul 9, 2024
1 parent 5e34f5b commit 297b2f8
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<QueryAuthenticationVerifyWebResponse> =
queryAuthenticationVerifyUseCase.execute()
.let { ResponseEntity.ok(it.toResponse()) }

@GetMapping("/form")
fun queryAuthenticationForm(): ResponseEntity<QueryAuthenticationFormWebResponse> =
queryAuthenticationFormUseCase.execute()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 297b2f8

Please sign in to comment.