mirror of
https://github.com/miniflux/v2.git
synced 2025-08-11 17:51:01 +00:00
Add generic webhook integration
This commit is contained in:
parent
32d33104a4
commit
48f6885f44
39 changed files with 527 additions and 324 deletions
|
@ -67,6 +67,18 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
|
|||
integration.GoogleReaderPassword = ""
|
||||
}
|
||||
|
||||
if integrationForm.WebhookEnabled {
|
||||
if integrationForm.WebhookURL == "" {
|
||||
integration.WebhookEnabled = false
|
||||
integration.WebhookSecret = ""
|
||||
} else if integration.WebhookSecret == "" {
|
||||
integration.WebhookSecret = crypto.GenerateRandomStringHex(32)
|
||||
}
|
||||
} else {
|
||||
integration.WebhookURL = ""
|
||||
integration.WebhookSecret = ""
|
||||
}
|
||||
|
||||
err = h.store.UpdateIntegration(integration)
|
||||
if err != nil {
|
||||
html.ServerError(w, r, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue