fix product edit
This commit is contained in:
parent
711983f312
commit
7d99a11e14
@ -28,6 +28,7 @@ import java.net.http.HttpResponse
|
||||
import java.nio.charset.StandardCharsets
|
||||
import java.time.LocalDateTime
|
||||
import java.time.ZoneId
|
||||
import java.time.format.DateTimeFormatter
|
||||
import java.util.*
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
@ -275,10 +276,10 @@ object Auth {
|
||||
foundOldAt.refreshHistory = (foundOldAt.refreshHistory ?: arrayListOf()).apply {
|
||||
add(RefreshHistory(
|
||||
oldAt = authUser.token,
|
||||
oldExpiryAt = expiresAt,
|
||||
oldExpiryAt = expiresAt.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
|
||||
newAt = atResponse.accessToken,
|
||||
newExpiryAt = LocalDateTime.now().plusSeconds(atResponse.expiresIn.toLong()),
|
||||
createdAt = LocalDateTime.now()
|
||||
newExpiryAt = LocalDateTime.now().plusSeconds(atResponse.expiresIn.toLong()).format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
|
||||
createdAt = LocalDateTime.now().format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
|
||||
))
|
||||
}
|
||||
database.update(foundOldAt)
|
||||
|
||||
@ -690,10 +690,10 @@ open class Plant : BaseModel() {
|
||||
|
||||
data class RefreshHistory(
|
||||
val oldAt: String,
|
||||
val oldExpiryAt: LocalDateTime,
|
||||
val oldExpiryAt: String,
|
||||
val newAt: String,
|
||||
val newExpiryAt: LocalDateTime,
|
||||
val createdAt: LocalDateTime
|
||||
val newExpiryAt: String,
|
||||
val createdAt: String
|
||||
)
|
||||
@Entity
|
||||
open class AuthTokenCache : BaseModel() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user