添加contest ip限制api;

OI problem的AC,total count也算入profile了
This commit is contained in:
zema1
2017-11-10 19:40:54 +08:00
parent 48f65d1a14
commit 727fbf48d8
13 changed files with 96 additions and 21 deletions

View File

@@ -277,6 +277,8 @@ class UserChangePasswordAPI(APIView):
class ApplyResetPasswordAPI(APIView):
@validate_serializer(ApplyResetPasswordSerializer)
def post(self, request):
if request.user.is_authenticated():
return self.error("You have already logged in, are you kidding me? ")
data = request.data
captcha = Captcha(request)
if not captcha.check(data["captcha"]):