From 646fd7b1bfbb3f81d9b5e35a2a504ffaf50ffd84 Mon Sep 17 00:00:00 2001 From: Lakshay Manchanda Date: Thu, 15 Feb 2024 17:47:05 +0530 Subject: [PATCH] Verification route fixed --- verify/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/verify/main.go b/verify/main.go index 5d3c459..05cb676 100644 --- a/verify/main.go +++ b/verify/main.go @@ -240,12 +240,12 @@ func verify(profileURL string, chaincode string) (string, error) { responseBody := bytes.NewBuffer(postBody) resp, err := http.Post(profileURL, "application/json", responseBody) if err != nil { - return "", err + return "BLOCKED", err } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { - return "", err + return "BLOCKED", err } var re res json.Unmarshal([]byte(body), &re) @@ -286,6 +286,8 @@ func (d *deps) handler(request events.APIGatewayProxyRequest) (events.APIGateway status, err := verify(profileURL, chaincode) if err != nil { + logVerification(d.client, d.ctx, status, profileURL, userId) + setProfileStatus(d.client, d.ctx, userId, status) return events.APIGatewayProxyResponse{}, err } logVerification(d.client, d.ctx, status, profileURL, userId)