From dad438c4d43fcb1e41297c872c2d65dffc11d316 Mon Sep 17 00:00:00 2001 From: Utkarsh Dixit Date: Sun, 16 May 2021 19:26:51 +0530 Subject: [PATCH] fix: model --- main.go | 4 ++-- model.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 9ed4cb4..7ee49ab 100644 --- a/main.go +++ b/main.go @@ -95,7 +95,7 @@ createOtp: return } - txnID, _ = tID["txnID"] + txnID, _ = tID["txnId"] }(otpResp) @@ -121,7 +121,7 @@ readOtp: h.Write([]byte(otp)) //create token - body := fmt.Sprintf("{\"otp\":\"%x\",\"txnID\":\"%s\"}", h.Sum(nil), txnID) + body := fmt.Sprintf("{\"otp\":\"%x\",\"txnId\":\"%s\"}", h.Sum(nil), txnID) tokReq, _ := http.NewRequest(http.MethodPost, "https://cdn-api.co-vin.in/api/v2/auth/validateMobileOtp", bytes.NewBufferString(body)) tokReq.Header.Set("pragma", "no-cache") diff --git a/model.go b/model.go index 1ccf17e..ec2c9f1 100644 --- a/model.go +++ b/model.go @@ -80,7 +80,7 @@ type Centers struct { DistrictNameL string `json:"district_name_l"` BlockName string `json:"block_name"` BlockNameL string `json:"block_name_l"` - Pincode string `json:"pincode"` + Pincode int `json:"pincode"` Lat float64 `json:"lat"` Long float64 `json:"long"` From string `json:"from"`