Subir todos los cambios recientes a la rama principal

This commit is contained in:
arielit3
2026-01-16 13:39:55 -07:00
parent de5b6feef4
commit 99427cd48c
38 changed files with 15383 additions and 66 deletions

View File

@@ -55,3 +55,13 @@ async def get_current_active_superuser(
status_code=403, detail="The user doesn't have enough privileges"
)
return current_user
async def get_current_active_user(
current_user: User = Depends(get_current_user),
) -> User:
if not current_user.is_active:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="Inactive user",
)
return current_user