Browse Source

slack JSON indent

Unknwon 9 năm trước cách đây
mục cha
commit
8e92d4352f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      models/webhook_slack.go

+ 1 - 1
models/webhook_slack.go

@@ -42,7 +42,7 @@ type SlackAttachment struct {
 func (p *SlackPayload) SetSecret(_ string) {}
 
 func (p *SlackPayload) JSONPayload() ([]byte, error) {
-	data, err := json.Marshal(p)
+	data, err := json.MarshalIndent(p, "", "  ")
 	if err != nil {
 		return []byte{}, err
 	}