Browse Source

Login Api testing

master
Ubuntu 2 years ago
parent
commit
2b3519e784
  1. 24
      smart_service/apis/app_user_login.py

24
smart_service/apis/app_user_login.py

@ -346,8 +346,8 @@ def grant_user_access(userdata=None, iid=None):
user_details['Installation ID'] = lst[0][0]
user_details['User ID'] = lst1[0][0]
return user_details
except:
return {'status': 0, 'error': 'Login Failure'}
except Exception as role_error:
return {'status': 0, 'error': role_error}
else:
# user = frappe.new_doc('User')
@ -370,10 +370,10 @@ def grant_user_access(userdata=None, iid=None):
user_details['Installation ID'] = lst[-1][0]
user_details['User ID'] = lst1[-1][0]
return user_details
except:
return {'status': 0, 'error': 'Login Failure'}
except:
return {'status': 0, 'error': 'Input data error'}
except Exception as e:
return {'status': 0, 'error': e}
except Exception as e1:
return {'status': 0, 'error': e1 }
def generate_keys(user):
@ -395,15 +395,3 @@ def login_generate_token(doc=None, method=None):
water.apple = new_tok
water.save()
return water.apple
def app_user_validation1(allow_guest=True):
dicData = {}
try:
# doc = frappe.get_doc("Fish", None)
# dicData['token'] = doc.apple
dicData['status'] = 1
except:
dicData['error'] = 'Failed to get Token'
return dicData
Loading…
Cancel
Save