fix(api): 补齐 bat-api 控制与后端 RPC

This commit is contained in:
2026-07-31 17:01:03 +08:00
parent 20ddd67947
commit 6af7706190
17 changed files with 793 additions and 51 deletions
+13 -4
View File
@@ -162,10 +162,19 @@ type LauncherEnvelope[T any] struct {
}
type AdminIndexResponse struct {
Service string `json:"service"`
Panel string `json:"panel"`
Status string `json:"status"`
Links []string `json:"links"`
Service string `json:"service"`
Panel string `json:"panel"`
Status string `json:"status"`
Links []string `json:"links"`
Controls []string `json:"controls"`
}
type AdminControlResponse struct {
Service string `json:"service"`
Action string `json:"action"`
RPCMethod string `json:"rpc_method"`
Status string `json:"status"`
Result any `json:"result"`
}
func writeNoStoreJSON(w http.ResponseWriter, status int, body any) {