mirror of
https://github.com/miniflux/v2.git
synced 2025-08-06 17:41:00 +00:00
Add generic webhook integration
This commit is contained in:
parent
32d33104a4
commit
48f6885f44
39 changed files with 527 additions and 324 deletions
|
@ -69,6 +69,9 @@ type IntegrationForm struct {
|
|||
ShaarliEnabled bool
|
||||
ShaarliURL string
|
||||
ShaarliAPISecret string
|
||||
WebhookEnabled bool
|
||||
WebhookURL string
|
||||
WebhookSecret string
|
||||
}
|
||||
|
||||
// Merge copy form values to the model.
|
||||
|
@ -129,6 +132,8 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.ShaarliEnabled = i.ShaarliEnabled
|
||||
integration.ShaarliURL = i.ShaarliURL
|
||||
integration.ShaarliAPISecret = i.ShaarliAPISecret
|
||||
integration.WebhookEnabled = i.WebhookEnabled
|
||||
integration.WebhookURL = i.WebhookURL
|
||||
}
|
||||
|
||||
// NewIntegrationForm returns a new IntegrationForm.
|
||||
|
@ -192,5 +197,7 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|||
ShaarliEnabled: r.FormValue("shaarli_enabled") == "1",
|
||||
ShaarliURL: r.FormValue("shaarli_url"),
|
||||
ShaarliAPISecret: r.FormValue("shaarli_api_secret"),
|
||||
WebhookEnabled: r.FormValue("webhook_enabled") == "1",
|
||||
WebhookURL: r.FormValue("webhook_url"),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue