success == true for otp validate

This commit is contained in:
Asim Aslam
2021-04-28 10:12:41 +01:00
parent b96bb863e2
commit edbbef0892

View File

@@ -85,8 +85,13 @@ func (e *Otp) Validate(ctx context.Context, req *pb.ValidateRequest, rsp *pb.Val
return errors.InternalServerError("otp.generate", "failed to validate code") return errors.InternalServerError("otp.generate", "failed to validate code")
} }
if !ok {
rsp.Success = false
return nil
}
// set the response // set the response
rsp.Success = ok rsp.Success = true
return nil return nil
} }