From 0f1d9bc3eb39fc5e1c155daa90adb9fe91ed8424 Mon Sep 17 00:00:00 2001 From: halo Date: Sat, 15 Jul 2023 16:30:45 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=BF=98=E8=AE=B0=E5=AF=86=E7=A0=81toke?= =?UTF-8?q?n=E5=A4=B1=E6=95=88=E5=8F=91=E9=80=81=E9=AA=8C=E8=AF=81?= =?UTF-8?q?=E7=A0=81=E6=8A=A5=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/api/password.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/authentication/api/password.py b/apps/authentication/api/password.py index da3e86510..53f47c03c 100644 --- a/apps/authentication/api/password.py +++ b/apps/authentication/api/password.py @@ -1,3 +1,4 @@ +from django.http import HttpResponseRedirect from rest_framework.generics import CreateAPIView from rest_framework.response import Response from rest_framework.permissions import AllowAny @@ -41,7 +42,7 @@ class UserResetPasswordSendCodeApi(CreateAPIView): token = request.GET.get('token') userinfo = cache.get(token) if not userinfo: - return reverse('authentication:forgot-previewing') + return HttpResponseRedirect(reverse('authentication:forgot-previewing')) serializer = self.get_serializer(data=request.data) serializer.is_valid(raise_exception=True)