Skip to content

Commit 335e3dc

Browse files
authored
Merge branch 'master' into set-url-after-upload-succeed
2 parents a6e235c + a7817a5 commit 335e3dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

leancloud/engine/leanengine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ def dispatch_on_login(_cloud_codes, app_params, params):
517517
return func(user)
518518

519519
def register_on_auth_data(_cloud_codes, func):
520-
func_name = "__on_auth_data__User"
520+
func_name = "__on_authdata__User"
521521

522522
if func_name in _cloud_codes:
523523
raise RuntimeError("on authdata is already registered")
@@ -529,11 +529,11 @@ def dispatch_on_auth_data(_cloud_codes, app_params, params):
529529
if not current_hook_key or current_hook_key != HOOK_KEY:
530530
raise LeanEngineError(code=401, message="Unauthorized.")
531531

532-
func = _cloud_codes.get("__on_auth_data__User")
532+
func = _cloud_codes.get("__on_authdata__User")
533533
if not func:
534534
return
535535

536-
auth_data = params["object"]
536+
auth_data = params["authData"]
537537
return func(auth_data)
538538

539539

tests/test_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def on_auth_data(auth_data):
509509

510510
response = requests.post(
511511
url + "/__engine/1.1/functions/_User/onAuthData",
512-
json={"object": {
512+
json={"authData": {
513513
"foo": {
514514
"openid": "openid",
515515
"access_token": "access_token",

0 commit comments

Comments
 (0)