Merge pull request #49 from NexusNull/patch-1

Update api.py
This commit is contained in:
Kaan Soral
2023-10-18 03:31:32 +03:00
committed by GitHub
+2 -2
View File
@@ -22,7 +22,7 @@ def signup_or_login_api(**args):
if not domain.electron and not only_login and not domain.is_sdk: jhtmle(self,"Can't signup on web"); return if not domain.electron and not only_login and not domain.is_sdk: jhtmle(self,"Can't signup on web"); return
if existing and not only_signup: if existing and not only_signup:
if existing.password==password or existing.password==hash_password(password,gf(existing,"salt","5")): if existing.password==hash_password(password,gf(existing,"salt","5")):
def login_transaction(): def login_transaction():
user=get_by_iid(existing.k('i')) user=get_by_iid(existing.k('i'))
auth=get_new_auth(self,user,domain) auth=get_new_auth(self,user,domain)
@@ -1735,4 +1735,4 @@ class APICall(webapp.RequestHandler):
application = webapp.WSGIApplication([ application = webapp.WSGIApplication([
('/api.*',APICall), ('/api.*',APICall),
],debug=is_sdk) ],debug=is_sdk)