feat: management && notify

This commit is contained in:
fallen-angle
2022-05-04 20:06:21 +08:00
parent e58bafd0d3
commit 7598280fc1
28 changed files with 1226 additions and 143 deletions

View File

@@ -2,7 +2,6 @@ package utils
import (
"encoding/json"
"fmt"
"nCovTrack-Backend/global"
"nCovTrack-Backend/models"
"time"
@@ -59,7 +58,7 @@ func RenewToken(tokenStr string) string {
if expireDuration.Hours() > float64(global.ServerSettings.Jwt.RenewAheadDays*24) {
return tokenStr
}
fmt.Println(expireDuration)
//fmt.Println(expireDuration)
claims["exp"] = time.Now().Add(global.TOKEN_EXPIRE_DAYS * 24 * time.Hour).Unix()
token = jwt.NewWithClaims(jwt.SigningMethodHS256, claims)