add auth to /uploads

This commit is contained in:
grngxd 2025-05-06 21:50:06 +01:00
parent fbd23fe2cf
commit a3312ef6f8
4 changed files with 31 additions and 6 deletions

View file

@ -11,9 +11,9 @@ import (
)
func GenerateJWT(key string, user User, expiryTimestamp uint64) (string, error) {
claims := jwt.MapClaims{
"user": user,
"exp": expiryTimestamp,
claims := Claims{
User: user,
Exp: expiryTimestamp,
}
token := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)