Add inactive user handling

This commit is contained in:
François Voron
2019-10-06 13:23:08 +02:00
parent a81b438ec9
commit 4ff6e2ad2b
3 changed files with 22 additions and 4 deletions

View File

@@ -24,6 +24,8 @@ class UserRouter:
if user is None:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST)
elif not user.is_active:
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST)
return user