Skip to content
This repository has been archived by the owner on Feb 19, 2025. It is now read-only.

Commit

Permalink
fix: no association on register link
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanfallet committed Sep 6, 2024
1 parent 22f81c7 commit bb37ed4
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ class AuthController(
}

override suspend fun registerCode(call: ApplicationCall, code: String): RegisterPayload {
val association = getAssociationForCallUseCase(call)
val codeInEmail = getCodeInEmailUseCase(code)?.takeIf {
it.associationId == requireAssociationForCallUseCase(call).id
} ?: throw ControllerException(
HttpStatusCode.NotFound, "auth_code_invalid"
)
association == null || it.associationId == association.id
} ?: throw ControllerException(HttpStatusCode.NotFound, "auth_code_invalid")
return RegisterPayload(codeInEmail.email)
}

Expand Down

0 comments on commit bb37ed4

Please sign in to comment.