Peter Mutwiri commited on
Commit ·
c4f6f06
1
Parent(s): a8dfcdf
fixed veryfy keys on sockets
Browse files- app/routers/socket.py +2 -2
app/routers/socket.py
CHANGED
|
@@ -2,7 +2,7 @@
|
|
| 2 |
import socketio
|
| 3 |
from fastapi import APIRouter, Depends, Path, Request
|
| 4 |
from fastapi.responses import PlainTextResponse
|
| 5 |
-
from app.deps import
|
| 6 |
|
| 7 |
# 1️⃣ Socket.IO server
|
| 8 |
sio = socketio.AsyncServer(
|
|
@@ -24,7 +24,7 @@ router = APIRouter(tags=["socket"])
|
|
| 24 |
async def socket_push(
|
| 25 |
org_id: str = Path(...),
|
| 26 |
request: Request = None,
|
| 27 |
-
_: str = Depends(
|
| 28 |
):
|
| 29 |
"""
|
| 30 |
Receive top-N rows from n8n workflow and broadcast them
|
|
|
|
| 2 |
import socketio
|
| 3 |
from fastapi import APIRouter, Depends, Path, Request
|
| 4 |
from fastapi.responses import PlainTextResponse
|
| 5 |
+
from app.deps import verify_api_key # your API-key guard
|
| 6 |
|
| 7 |
# 1️⃣ Socket.IO server
|
| 8 |
sio = socketio.AsyncServer(
|
|
|
|
| 24 |
async def socket_push(
|
| 25 |
org_id: str = Path(...),
|
| 26 |
request: Request = None,
|
| 27 |
+
_: str = Depends(verify_api_key),
|
| 28 |
):
|
| 29 |
"""
|
| 30 |
Receive top-N rows from n8n workflow and broadcast them
|