File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
recipe/emailverification/api Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,19 @@ func MakeAPIImplementation() evmodels.APIInterface {
5959 return evmodels.IsEmailVerifiedGETResponse {}, err
6060 }
6161
62- isVerified := sessionContainer .GetClaimValueWithContext (evclaims .EmailVerificationClaim , userContext )
63- if isVerified == nil {
62+ var isVerified bool = false
63+ if isVerifiedVal , ok := sessionContainer .GetClaimValueWithContext (evclaims .EmailVerificationClaim , userContext ).(map [string ]interface {}); ok {
64+ isVerified , ok = isVerifiedVal ["v" ].(bool )
65+ if ! ok {
66+ return evmodels.IsEmailVerifiedGETResponse {}, errors .New ("should never come here: EmailVerificationClaim failed to set value" )
67+ }
68+ } else {
6469 return evmodels.IsEmailVerifiedGETResponse {}, errors .New ("should never come here: EmailVerificationClaim failed to set value" )
6570 }
71+
6672 return evmodels.IsEmailVerifiedGETResponse {
6773 OK : & struct { IsVerified bool }{
68- IsVerified : isVerified .( bool ) ,
74+ IsVerified : isVerified ,
6975 },
7076 }, nil
7177 }
You can’t perform that action at this time.
0 commit comments