From 4c0832b55069c2b0dfed27e942f7ac4fb9cdc5b3 Mon Sep 17 00:00:00 2001 From: venkataakhil Date: Sat, 24 Jun 2023 16:00:54 +0530 Subject: [PATCH] Login error log fix --- smart_service/apis/app_user_login.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/smart_service/apis/app_user_login.py b/smart_service/apis/app_user_login.py index 97924e7..780c77b 100644 --- a/smart_service/apis/app_user_login.py +++ b/smart_service/apis/app_user_login.py @@ -857,17 +857,18 @@ def generate_refresh_token(): @frappe.whitelist(allow_guest=1, methods=['POST']) def refresh_token(): - req = frappe.request.data - req = json.loads(req) - refresh_token= req['refresh_token'] - device_id= req['DeviceID'] - + """ For Refresh API """ rate_res = custom_rate_limit(limit=5, seconds=15) if rate_res != 1: return rate_res if refresh_token: frappe.set_user("Administrator") + req = frappe.request.data + req = json.loads(req) + refresh_token= req['refresh_token'] + device_id= req['DeviceID'] + # frappe.log_error('') # req = json.loads(frappe.request.data) # ref_token = req['refresh_token'] ref_token = refresh_token