From 81de838d93c6d6f1deabe68ee491af04696a7e58 Mon Sep 17 00:00:00 2001 From: Abhishek Kondur Date: Mon, 27 Nov 2023 14:43:12 +0400 Subject: [PATCH] return user details form db --- logic/jwts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/logic/jwts.go b/logic/jwts.go index 105546925..6e227b59b 100644 --- a/logic/jwts.go +++ b/logic/jwts.go @@ -108,7 +108,7 @@ func VerifyUserToken(tokenString string) (username string, issuperadmin, isadmin } if user.UserName != "" { - return claims.UserName, claims.IsSuperAdmin, claims.IsAdmin, nil + return user.UserName, user.IsSuperAdmin, user.IsAdmin, nil } err = errors.New("user does not exist") }