From 34cd7b9aa07ebc6deb6e890552682edadf5b27d4 Mon Sep 17 00:00:00 2001 From: Joe <1264204425@qq.com> Date: Wed, 4 Sep 2024 10:25:53 +0800 Subject: [PATCH] feat: change login no count redirect --- api/controllers/console/auth/login.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/controllers/console/auth/login.py b/api/controllers/console/auth/login.py index 055882411c..e1db3775fe 100644 --- a/api/controllers/console/auth/login.py +++ b/api/controllers/console/auth/login.py @@ -45,8 +45,10 @@ class LoginApi(Resource): raise NotAllowedCreateWorkspace() token = AccountService.send_reset_password_email(email=args["email"]) - return redirect(f"{dify_config.CONSOLE_WEB_URL}/reset-password?token={token}&email={args['email']}") - + return redirect( + location=f"{dify_config.CONSOLE_WEB_URL}/reset-password/check-code?token={token}&email={args['email']}", + code=307 + ) # SELF_HOSTED only have one workspace tenants = TenantService.get_join_tenants(account) if len(tenants) == 0: