From 19b19e7f48d6375806f827713a98cffd2c57a434 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Mon, 29 Jul 2024 03:06:44 +0900 Subject: refactor(backend): enable emit_pointers_for_null_types in sqlc --- backend/auth/jwt.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'backend/auth/jwt.go') 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)), -- cgit v1.2.3-70-g09d2