Skip to content

Commit

Permalink
refactor: 移除无用方法
Browse files Browse the repository at this point in the history
  • Loading branch information
xfqwdsj committed Feb 17, 2024
1 parent 9e24494 commit 4da7fc1
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() }
Expand All @@ -61,8 +60,6 @@ class VerificationCode(id: EntityID<Int>) : Entity<Int>(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 {
Expand Down

0 comments on commit 4da7fc1

Please sign in to comment.