feat: sesión 1 año + validación sintaxis plantilla en tiempo real

This commit is contained in:
Lizandro Guarnizo
2026-04-30 22:53:10 -05:00
parent 46c89457dc
commit 4e564a7e28
7 changed files with 41 additions and 10 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ func (t *Token) CreateToken(c *fiber.Ctx, userID uint, secret string, expire ...
if len(expire) > 0 {
t.Expire = expire[0]
} else {
t.Expire = 3600
t.Expire = 31536000 // 1 año por defecto si no se configura
}
expiresIn := time.Now().Add(time.Duration(t.Expire) * time.Second).Unix()
claims["exp"] = expiresIn