feat: Sentinel 支持自定义 API 路径前缀 (base_path)

- 节点编辑对话框新增「API 路径前缀」字段 (默认 /SenSu)
- 后端保存/读取 base_path
- API 响应包含 base_path 供前端回显

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
qinglong
2026-06-13 21:19:25 +08:00
parent 67d0f00525
commit 68717daefb
2 changed files with 7 additions and 0 deletions
+3
View File
@@ -109,6 +109,7 @@ class Plugin(PluginWebMixin):
result.append({
"id": n.get("id", ""), "name": n.get("name", ""), "url": n.get("url", ""),
"notes": n.get("notes", ""),
"base_path": n.get("base_path", "/SenSu"),
"enabled": n.get("enabled", True),
"online": c.get("online", False),
"system": c.get("system", {}),
@@ -130,6 +131,7 @@ class Plugin(PluginWebMixin):
"name": data.get("name", "").strip(),
"url": data.get("url", "").strip().rstrip("/"),
"api_key": data.get("api_key", "").strip(),
"base_path": data.get("base_path", "/SenSu").strip() or "/SenSu",
"notes": data.get("notes", "").strip(),
"enabled": data.get("enabled", True),
}
@@ -233,6 +235,7 @@ class Plugin(PluginWebMixin):
result.append({
"id": n.get("id", ""), "name": n.get("name", ""), "url": n.get("url", ""),
"notes": n.get("notes", ""),
"base_path": n.get("base_path", "/SenSu"),
"enabled": n.get("enabled", True),
"online": c.get("online", False),
"system": c.get("system", {}),