Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulguna committed Aug 22, 2019
1 parent 1cbaa93 commit 7298908
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion master_api_service/api/console/endpoints/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def post(self):
"sig": req_data['sig']
}
myResponse1 = requests.post(api_url_base, data=json.dumps(json_data), headers=headers).json()
if not myResponse1['result']:
if myResponse1['result'] != True:
data = {"error message":"Hask key could not be verified","status":404, "timestamp":getTime(),"path":request.url}
return Response(json.dumps(data),
status=404,
Expand All @@ -151,6 +151,13 @@ def post(self):
"msg":req_data['hash']
}
myResponse2 = requests.post(api_url_base, data=json.dumps(req_data), headers=headers).json()
if myResponse2['status'] != 200:
data = {"error message":"Hash Key and messsage could not be verified","status":401, "timestamp":getTime(),"path":request.url}
return Response(json.dumps(data),
status=401,
mimetype='application/json'
)

if myResponse2['result']['msg'] != signed_message:
data = {"error message":"Hash Key and messsage could not be verified","status":401, "timestamp":getTime(),"path":request.url}
return Response(json.dumps(data),
Expand Down

0 comments on commit 7298908

Please sign in to comment.