refactor: advanced custom channel route editor (#6865)

* refactor: advanced custom channel route editor

* fix(channels): show raw balance response from balance cell
This commit is contained in:
Seefs
2026-08-18 17:31:21 +08:00
committed by GitHub
parent 3dda1d50c6
commit 2b0efd8484
21 changed files with 1551 additions and 506 deletions
+8
View File
@@ -22,6 +22,14 @@ func Marshal(v any) ([]byte, error) {
return json.Marshal(v)
}
func IndentJson(data []byte) ([]byte, error) {
var buffer bytes.Buffer
if err := json.Indent(&buffer, data, "", " "); err != nil {
return nil, err
}
return buffer.Bytes(), nil
}
func GetJsonType(data json.RawMessage) string {
trimmed := bytes.TrimSpace(data)
if len(trimmed) == 0 {