feat: product store

This commit is contained in:
zzw
2026-08-07 15:41:26 +08:00
parent 089bdc9761
commit 6b7b8af486
2 changed files with 1 additions and 3 deletions
Binary file not shown.
+1 -3
View File
@@ -54,6 +54,7 @@ func Wrap(next http.HandlerFunc) http.HandlerFunc {
}
}
// unwrapJSONData 将 RPC Response.dataproto string)里的 JSON 文本还原为对象/数组/数字。
func unwrapJSONData(v any) any {
s, ok := v.(string)
if !ok {
@@ -63,9 +64,6 @@ func unwrapJSONData(v any) any {
if s == "" {
return nil
}
if s[0] != '{' && s[0] != '[' {
return v
}
var parsed any
if err := json.Unmarshal([]byte(s), &parsed); err != nil {
return v