Skip to content

Commit

Permalink
fix message in webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
Hueter57 committed Dec 13, 2024
1 parent 0a6e6f0 commit 0f91889
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions service/webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,12 @@ func WebhookEventHandler(c echo.Context, reqBody, resBody []byte) {
var message string

if strings.Contains(c.Request().URL.Path, "/api/requests") {
message += WebhookRequestsEventHandler(c, resBody)
message = WebhookRequestsEventHandler(c, resBody)
} else if strings.Contains(c.Request().URL.Path, "/api/transactions") {
message += WebhookTransactionsEventHandler(c, resBody)
message = WebhookTransactionsEventHandler(c, resBody)
}
if len(message) == 0 {
return
}
_ = RequestWebhook(message, webhookSecret, webhookChannelId, webhookId, 1)

Check warning on line 97 in service/webhook.go

View check run for this annotation

Codecov / codecov/patch

service/webhook.go#L90-L97

Added lines #L90 - L97 were not covered by tests
}
Expand Down

0 comments on commit 0f91889

Please sign in to comment.