diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/api/relay.py')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/api/relay.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/api/relay.py b/packages/meshbay-hub/src/meshbay_hub/api/relay.py index d2a4b81..f82495b 100644 --- a/packages/meshbay-hub/src/meshbay_hub/api/relay.py +++ b/packages/meshbay-hub/src/meshbay_hub/api/relay.py @@ -24,7 +24,7 @@ from fastapi import APIRouter, Depends, Header, HTTPException from pydantic import BaseModel from sqlalchemy.ext.asyncio import AsyncSession -from meshbay_hub.api.deps import get_current_user +from meshbay_hub.api.deps import get_current_user, require_admin from meshbay_hub.auth import _hub_id, hub_public_key_pem from meshbay_hub.db.engine import get_db from meshbay_hub.db.models import User @@ -100,7 +100,7 @@ async def list_relays(): @router.post("/approve", status_code=201) async def admin_approve_relay( body: RelayAdminApproveRequest, - current_user: User = Depends(get_current_user), + current_user: User = Depends(require_admin), ): """Admin: pre-approve a relay by registering its public key.""" _relays[body.relay_id] = { |