Copy/pasted login from ImNote

This commit is contained in:
Mawoka
2022-02-27 22:06:35 +01:00
parent 1805d6fe98
commit da09f88751
6 changed files with 765 additions and 2 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ async def create_user(user: route_user, background_task: BackgroundTasks) -> Use
res = await User.objects.filter((User.email == user.email) | (User.username == user.username)).all()
if len(res) != 0:
raise HTTPException(status_code=400, detail="User already exists")
raise HTTPException(status_code=409, detail="User already exists")
user.password = get_password_hash(user.password)
if len(user.username) == 32: