Compare commits

...

2 Commits

Author SHA1 Message Date
e30d50845a feat(vars): 添加 OK 状态码
在 status.go 文件中添加了新的状态码 OK,值为 "OK"。这个状态码可以用于表示系统或组件运行正常的情况。
2025-09-12 23:27:14 +08:00
b4cd51a6dc refactor(encipher): 更新 JWT 过期时间变量
- 将 vars.JwtExpireDay 更改为 vars.JwtExpire,使代码更具通用性
- 优化了 GenerateTokenAes 函数中的过期时间计算逻辑
2025-09-12 20:11:49 +08:00
2 changed files with 3 additions and 1 deletions

View File

@@ -30,7 +30,7 @@ func GenerateTokenAes(id uint, identity, client, role string, owner any, extend
if !(JwtSecretLen == 16 || JwtSecretLen == 24 || JwtSecretLen == 32) {
return "", errcode.ErrJWTSecretKey
}
expireTime := time.Now().Add(vars.JwtExpireDay)
expireTime := time.Now().Add(vars.JwtExpire)
claims := types.JwtClaims{
ID: id,
Identity: identity,

View File

@@ -5,4 +5,6 @@ const (
NormalStatus = 1
// DisabledStatus .
DisabledStatus = -1
OK string = "OK"
)