feat: Implement batch team owner processing with dedicated upload, configuration, and monitoring pages and backend services.

This commit is contained in:
2026-01-30 18:59:03 +08:00
parent 165c6d69b9
commit 6f18740215
7 changed files with 348 additions and 46 deletions

View File

@@ -52,3 +52,17 @@ func CORS(next http.HandlerFunc) http.HandlerFunc {
next(w, r)
}
}
// decodeJSON 解析 JSON 响应体
func decodeJSON(body interface{}, v interface{}) error {
switch b := body.(type) {
case []byte:
return json.Unmarshal(b, v)
default:
// 假设是 io.Reader
if reader, ok := body.(interface{ Read([]byte) (int, error) }); ok {
return json.NewDecoder(reader).Decode(v)
}
return json.Unmarshal(body.([]byte), v)
}
}