From 4da7fc1f4a6db0581bf5cc1d9907923e6da7bbde Mon Sep 17 00:00:00 2001 From: LTFan Date: Sat, 17 Feb 2024 21:44:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E7=A7=BB=E9=99=A4=E6=97=A0?= =?UTF-8?q?=E7=94=A8=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kotlin/xyz/xfqlittlefan/fhraise/models/VerificationCode.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/server/src/main/kotlin/xyz/xfqlittlefan/fhraise/models/VerificationCode.kt b/server/src/main/kotlin/xyz/xfqlittlefan/fhraise/models/VerificationCode.kt index ed67a35..d14ea6c 100644 --- a/server/src/main/kotlin/xyz/xfqlittlefan/fhraise/models/VerificationCode.kt +++ b/server/src/main/kotlin/xyz/xfqlittlefan/fhraise/models/VerificationCode.kt @@ -34,7 +34,6 @@ import xyz.xfqlittlefan.fhraise.AppDatabase import xyz.xfqlittlefan.fhraise.api.appAuthTimeout import xyz.xfqlittlefan.fhraise.appDatabase import xyz.xfqlittlefan.fhraise.appSecret -import xyz.xfqlittlefan.fhraise.routes.Api val smtpServer = appSecret.propertyOrNull("auth.email.smtp.server")?.getString() val smtpPort = smtpServer?.let { appSecret.propertyOrNull("auth.email.smtp.port")?.getString()?.toIntOrNull() } @@ -61,8 +60,6 @@ class VerificationCode(id: EntityID) : Entity(id) { internal set } -private fun Api.Auth.Type.getOwner(credential: String) = "${credentialType.name}:$credential" - suspend fun AppDatabase.queryOrGenerateVerificationCode(scope: CoroutineScope, tokenHash: Int) = dbQuery { VerificationCode.find { VerificationCodes.tokenHash eq tokenHash }.firstOrNull() } ?: dbQuery {