diff options
Diffstat (limited to 'backend/auth/jwt.go')
| -rw-r--r-- | backend/auth/jwt.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/backend/auth/jwt.go b/backend/auth/jwt.go index c15fc01..0b92155 100644 --- a/backend/auth/jwt.go +++ b/backend/auth/jwt.go @@ -19,15 +19,11 @@ type JWTClaims struct { } func NewJWT(user *db.User) (string, error) { - var iconPath *string - if user.IconPath.Valid { - iconPath = &user.IconPath.String - } claims := &JWTClaims{ UserID: int(user.UserID), Username: user.Username, DisplayName: user.DisplayName, - IconPath: iconPath, + IconPath: user.IconPath, IsAdmin: user.IsAdmin, RegisteredClaims: jwt.RegisteredClaims{ ExpiresAt: jwt.NewNumericDate(time.Now().Add(time.Hour * 24)), |
