Skip to content

Commit 2366dd7

Browse files
committed
better name
1 parent 5021977 commit 2366dd7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

services/webhook/feishu.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ func newFeishuRequest(_ context.Context, w *webhook_model.Webhook, t *webhook_mo
212212
payload.Sign = feishuGenSign(w.Secret, timestamp)
213213
}
214214

215-
return sendHTTPRequest(payload, w, t, false)
215+
return prepareJSONRequest(payload, w, t, false /* no default headers */)
216216
}
217217

218218
func init() {

services/webhook/payloader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ func newJSONRequest[T any](pc payloadConvertor[T], w *webhook_model.Webhook, t *
9595
if err != nil {
9696
return nil, nil, err
9797
}
98-
return sendHTTPRequest(payload, w, t, withDefaultHeaders)
98+
return prepareJSONRequest(payload, w, t, withDefaultHeaders)
9999
}
100100

101-
func sendHTTPRequest[T any](payload T, w *webhook_model.Webhook, t *webhook_model.HookTask, withDefaultHeaders bool) (*http.Request, []byte, error) {
101+
func prepareJSONRequest[T any](payload T, w *webhook_model.Webhook, t *webhook_model.HookTask, withDefaultHeaders bool) (*http.Request, []byte, error) {
102102
body, err := json.MarshalIndent(payload, "", " ")
103103
if err != nil {
104104
return nil, nil, err

0 commit comments

Comments
 (0)