chore(go): create webhooks repository. Closes #4085 (#4146)

This commit is contained in:
Gabe Kangas
2025-01-18 15:40:10 -08:00
committed by GitHub
parent da9d5b8411
commit 6abbf8f50c
7 changed files with 108 additions and 49 deletions

View File

@@ -9,8 +9,8 @@ import (
log "github.com/sirupsen/logrus"
"github.com/owncast/owncast/core/data"
"github.com/owncast/owncast/models"
"github.com/owncast/owncast/persistence/webhookrepository"
)
// webhookWorkerPoolSize defines the number of concurrent HTTP webhook requests.
@@ -87,7 +87,8 @@ func sendWebhook(job Job) error {
defer resp.Body.Close()
if err := data.SetWebhookAsUsed(job.webhook); err != nil {
webhooksRepo := webhookrepository.Get()
if err := webhooksRepo.SetWebhookAsUsed(job.webhook); err != nil {
log.Warnln(err)
}