1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-01 17:38:37 +00:00

Add webhook event for saving entry

This commit is contained in:
Frédéric Guillot 2023-09-10 17:47:05 -07:00
parent ca6af9684a
commit 9990afb722
4 changed files with 121 additions and 19 deletions

View file

@ -29,15 +29,13 @@ func (h *handler) saveEntry(w http.ResponseWriter, r *http.Request) {
return
}
settings, err := h.store.Integration(request.UserID(r))
userIntegrations, err := h.store.Integration(request.UserID(r))
if err != nil {
json.ServerError(w, r, err)
return
}
go func() {
integration.SendEntry(entry, settings)
}()
go integration.SendEntry(entry, userIntegrations)
json.Created(w, r, map[string]string{"message": "saved"})
}