diff options
Diffstat (limited to 'internal/db/webhook.go')
-rw-r--r-- | internal/db/webhook.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/db/webhook.go b/internal/db/webhook.go index 96a01971..418f2729 100644 --- a/internal/db/webhook.go +++ b/internal/db/webhook.go @@ -437,10 +437,10 @@ type HookTask struct { func (t *HookTask) BeforeUpdate() { if t.RequestInfo != nil { - t.RequestContent = t.MarshalJSON(t.RequestInfo) + t.RequestContent = t.ToJSON(t.RequestInfo) } if t.ResponseInfo != nil { - t.ResponseContent = t.MarshalJSON(t.ResponseInfo) + t.ResponseContent = t.ToJSON(t.ResponseInfo) } } @@ -472,7 +472,7 @@ func (t *HookTask) AfterSet(colName string, _ xorm.Cell) { } } -func (t *HookTask) MarshalJSON(v interface{}) string { +func (t *HookTask) ToJSON(v interface{}) string { p, err := jsoniter.Marshal(v) if err != nil { log.Error("Marshal [%d]: %v", t.ID, err) |