fix: env saving

This commit is contained in:
Lakhan Samani
2022-05-31 13:11:54 +05:30
parent cf8762b7a0
commit eeff88c853
27 changed files with 532 additions and 493 deletions

View File

@@ -192,7 +192,7 @@ func GetAccessToken(gc *gin.Context) (string, error) {
// Function to validate access token for authorizer apis (profile, update_profile)
func ValidateAccessToken(gc *gin.Context, accessToken string) (map[string]interface{}, error) {
var res map[string]interface{}
res := make(map[string]interface{})
if accessToken == "" {
return res, fmt.Errorf(`unauthorized`)
@@ -222,7 +222,7 @@ func ValidateAccessToken(gc *gin.Context, accessToken string) (map[string]interf
// Function to validate refreshToken
func ValidateRefreshToken(gc *gin.Context, refreshToken string) (map[string]interface{}, error) {
var res map[string]interface{}
res := make(map[string]interface{})
if refreshToken == "" {
return res, fmt.Errorf(`unauthorized`)