fix: tests

This commit is contained in:
Lakhan Samani
2022-02-28 07:55:01 +05:30
parent b68d9ce661
commit df1c56bb1c
69 changed files with 284 additions and 236 deletions

View File

@@ -24,13 +24,13 @@ func VerifyEmailResolver(ctx context.Context, params model.VerifyEmailInput) (*m
verificationRequest, err := db.Provider.GetVerificationRequestByToken(params.Token)
if err != nil {
return res, fmt.Errorf(`invalid token`)
return res, fmt.Errorf(`invalid token: %s`, err.Error())
}
// verify if token exists in db
claim, err := token.ParseJWTToken(params.Token)
if err != nil {
return res, fmt.Errorf(`invalid token`)
return res, fmt.Errorf(`invalid token: %s`, err.Error())
}
user, err := db.Provider.GetUserByEmail(claim["email"].(string))