backend: fix: error message

This commit is contained in:
starnakin 2023-10-24 16:34:38 +02:00
parent a3e2c2f631
commit cb010470a9

View File

@ -18,7 +18,7 @@ class Register(View):
return HttpResponse("error: password invalid") return HttpResponse("error: password invalid")
username = request.POST.get("username") username = request.POST.get("username")
if (username == None or len(username) < 3): if (username == None or len(username) < 3):
return HttpResponse("error: password invalid") return HttpResponse("error: username invalid")
if User.objects.filter(username=username).exists(): if User.objects.filter(username=username).exists():
return HttpResponse("error: username already used") return HttpResponse("error: username already used")