fix: relogin

This commit is contained in:
SOR
2026-08-09 20:23:16 +08:00
parent 52dfb2c35f
commit 63dafaa568
4 changed files with 9 additions and 6 deletions
@@ -1,9 +1,11 @@
package com.github.sor2171.backend.entity.vo.response
import com.github.sor2171.backend.utils.DateUtils.getCurrentDateTime
import kotlinx.datetime.LocalDateTime
import kotlinx.serialization.Serializable
@Serializable
data class ReloginVO(
val token: String = "",
val expire: String = "",
val expire: LocalDateTime = getCurrentDateTime(),
)
@@ -8,6 +8,7 @@ import com.github.sor2171.backend.entity.vo.request.PasswordResetVO
import com.github.sor2171.backend.entity.vo.response.ReloginVO
import com.github.sor2171.backend.service.AccountService
import com.github.sor2171.backend.utils.Const
import com.github.sor2171.backend.utils.DateUtils
import com.github.sor2171.backend.utils.DateUtils.getCurrentDateTime
import com.github.sor2171.backend.utils.FlowUtils
import com.github.sor2171.backend.utils.JwtUtils
@@ -120,7 +121,7 @@ class AuthorizationService(
val voMono = accountMono.map {
ReloginVO(
jwtUtils.createJwt(user, it.id!!, it.username),
jwtUtils.expiresTime().toInstant().toString()
DateUtils.dateToLocalDateTime(jwtUtils.expiresTime())
)
}
return voMono