fix: use session / access_token for profile related queries or mutation

This commit is contained in:
Lakhan Samani
2023-10-13 08:11:55 +05:30
parent e941e4834a
commit 6a4568dcf3
6 changed files with 41 additions and 35 deletions

View File

@@ -21,7 +21,6 @@ func UserInfoHandler() gin.HandlerFunc {
})
return
}
claims, err := token.ValidateAccessToken(gc, accessToken)
if err != nil {
log.Debug("Error validating access token: ", err)
@@ -30,7 +29,6 @@ func UserInfoHandler() gin.HandlerFunc {
})
return
}
userID := claims["sub"].(string)
user, err := db.Provider.GetUserByID(gc, userID)
if err != nil {