From bd4bf3ff73e69dbe810d7c3dd7d9a983d1ed7d62 Mon Sep 17 00:00:00 2001 From: Joe <1264204425@qq.com> Date: Wed, 4 Sep 2024 11:04:03 +0800 Subject: [PATCH] feat: change login AccountNotFound response --- api/controllers/console/auth/login.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/api/controllers/console/auth/login.py b/api/controllers/console/auth/login.py index e1db3775fe..9f5338d283 100644 --- a/api/controllers/console/auth/login.py +++ b/api/controllers/console/auth/login.py @@ -45,10 +45,7 @@ class LoginApi(Resource): raise NotAllowedCreateWorkspace() token = AccountService.send_reset_password_email(email=args["email"]) - return redirect( - location=f"{dify_config.CONSOLE_WEB_URL}/reset-password/check-code?token={token}&email={args['email']}", - code=307 - ) + return {"result": "fail", "data": token, "message": "account_not_found"} # SELF_HOSTED only have one workspace tenants = TenantService.get_join_tenants(account) if len(tenants) == 0: