fix: enforce Rule 1 JSON wrappers across 80+ files, fix 6 bugs
- Replace all encoding/json direct calls with common.Marshal/Unmarshal/DecodeJson per Rule 1 - Fix Dify nil pointer dereference on remote image upload (relay-dify.go) - Fix Claude relay file content type detection for text/* and PDF (relay-claude.go) - Fix unsafe type assertions in Claude relay and Vertex GetModelRegion - Fix StreamScanner unconditionally resetting pre-existing StreamStatus - Add inferMimeTypeFromFilename() for proper MIME type handling in DTO - Fix Mac build script hardcoded DMG version (now reads from tauri.conf.json) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,6 @@ import (
|
||||
"crypto/hmac"
|
||||
"crypto/sha256"
|
||||
"encoding/hex"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/http"
|
||||
"time"
|
||||
@@ -49,7 +48,7 @@ func SendWebhookNotify(webhookURL string, secret string, data dto.Notify) error
|
||||
}
|
||||
|
||||
// 序列化负载
|
||||
payloadBytes, err := json.Marshal(payload)
|
||||
payloadBytes, err := common.Marshal(payload)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to marshal webhook payload: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user