From edbbef0892421b6dfd5caf370836fffade93fd43 Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Wed, 28 Apr 2021 10:12:41 +0100 Subject: [PATCH] success == true for otp validate --- otp/handler/otp.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/otp/handler/otp.go b/otp/handler/otp.go index f47e35d..316ac92 100644 --- a/otp/handler/otp.go +++ b/otp/handler/otp.go @@ -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") } + if !ok { + rsp.Success = false + return nil + } + // set the response - rsp.Success = ok + rsp.Success = true return nil }