Update main.go

This commit is contained in:
Tracker-Friendly 2024-04-28 11:20:54 +01:00
parent 5a76b78d77
commit 8e014312e2
1 changed files with 4 additions and 4 deletions

View File

@ -393,8 +393,8 @@ func main() {
}
session := claims["session"].(string)
exp := claims["exp"].(int64)
if exp < time.Now().Unix() {
exp := claims["exp"].(float64)
if int64(exp) < time.Now().Unix() {
c.JSON(403, gin.H{"error": "Expired token"})
return
}
@ -456,8 +456,8 @@ func main() {
}
session := claims["session"].(string)
exp := claims["exp"].(int64)
if exp < time.Now().Unix() {
exp := claims["exp"].(float64)
if int64(exp) < time.Now().Unix() {
c.JSON(403, gin.H{"error": "Expired token"})
return
}