feat: speed up dashboard page loading

This commit is contained in:
engigu
2025-09-20 14:09:07 +08:00
parent f51295e945
commit 0ecad7f23d
5 changed files with 235 additions and 34 deletions
+3 -1
View File
@@ -2,9 +2,10 @@ package util
import (
"fmt"
"github.com/golang-jwt/jwt/v5"
"message-nest/pkg/setting"
"time"
"github.com/golang-jwt/jwt/v5"
)
type UserClaims struct {
@@ -16,6 +17,7 @@ type UserClaims struct {
func GenerateToken(username, password string) (string, error) {
expHours := 1 * 24 * time.Hour
//expHours := 1 * time.Minute
SetClaims := UserClaims{
Username: username,
Password: EncodeMD5(password),