diff --git a/api/kiwi_vpn_api/routers/admin.py b/api/kiwi_vpn_api/routers/admin.py index 758b100..ca0ad6e 100644 --- a/api/kiwi_vpn_api/routers/admin.py +++ b/api/kiwi_vpn_api/routers/admin.py @@ -57,6 +57,7 @@ async def create_initial_admin( if current_config is None: raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST) + # fail if any user exists with Connection.session as db: if db.exec(select(User).limit(1)).first() is not None: raise HTTPException(status_code=status.HTTP_409_CONFLICT)