Fix OpenClaw: auto-include gateway token in dashboard link

This commit is contained in:
Gan, Jimmy
2026-02-22 18:30:34 +08:00
parent 8797231f53
commit 87fdabcd50
3 changed files with 26 additions and 2 deletions
+6 -1
View File
@@ -5,7 +5,7 @@ import platform
import time
import httpx
from fastapi import APIRouter, Query
from config import TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, VOLUME_ROOT
from config import TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID, VOLUME_ROOT, OPENCLAW_GATEWAY_TOKEN
router = APIRouter()
@@ -110,3 +110,8 @@ def _classify(method, path, status, user):
return "noise"
# Info — everything else
return "info"
@router.get("/openclaw-token")
def openclaw_token():
return {"token": OPENCLAW_GATEWAY_TOKEN}