Update main.go
This commit is contained in:
parent
5a76b78d77
commit
8e014312e2
8
main.go
8
main.go
|
@ -393,8 +393,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
session := claims["session"].(string)
|
session := claims["session"].(string)
|
||||||
exp := claims["exp"].(int64)
|
exp := claims["exp"].(float64)
|
||||||
if exp < time.Now().Unix() {
|
if int64(exp) < time.Now().Unix() {
|
||||||
c.JSON(403, gin.H{"error": "Expired token"})
|
c.JSON(403, gin.H{"error": "Expired token"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -456,8 +456,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
session := claims["session"].(string)
|
session := claims["session"].(string)
|
||||||
exp := claims["exp"].(int64)
|
exp := claims["exp"].(float64)
|
||||||
if exp < time.Now().Unix() {
|
if int64(exp) < time.Now().Unix() {
|
||||||
c.JSON(403, gin.H{"error": "Expired token"})
|
c.JSON(403, gin.H{"error": "Expired token"})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue