mirror of
https://github.com/miniflux/v2.git
synced 2025-08-26 18:21:01 +00:00
feat(integration): add ntfy integration
This commit is contained in:
parent
3ca52c7f7f
commit
968355f9b9
32 changed files with 567 additions and 17 deletions
|
@ -103,6 +103,13 @@ type IntegrationForm struct {
|
|||
BetulaEnabled bool
|
||||
BetulaURL string
|
||||
BetulaToken string
|
||||
NtfyEnabled bool
|
||||
NtfyTopic string
|
||||
NtfyURL string
|
||||
NtfyAPIToken string
|
||||
NtfyUsername string
|
||||
NtfyPassword string
|
||||
NtfyIconURL string
|
||||
}
|
||||
|
||||
// Merge copy form values to the model.
|
||||
|
@ -195,6 +202,13 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.BetulaEnabled = i.BetulaEnabled
|
||||
integration.BetulaURL = i.BetulaURL
|
||||
integration.BetulaToken = i.BetulaToken
|
||||
integration.NtfyEnabled = i.NtfyEnabled
|
||||
integration.NtfyTopic = i.NtfyTopic
|
||||
integration.NtfyURL = i.NtfyURL
|
||||
integration.NtfyAPIToken = i.NtfyAPIToken
|
||||
integration.NtfyUsername = i.NtfyUsername
|
||||
integration.NtfyPassword = i.NtfyPassword
|
||||
integration.NtfyIconURL = i.NtfyIconURL
|
||||
}
|
||||
|
||||
// NewIntegrationForm returns a new IntegrationForm.
|
||||
|
@ -290,6 +304,13 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|||
BetulaEnabled: r.FormValue("betula_enabled") == "1",
|
||||
BetulaURL: r.FormValue("betula_url"),
|
||||
BetulaToken: r.FormValue("betula_token"),
|
||||
NtfyEnabled: r.FormValue("ntfy_enabled") == "1",
|
||||
NtfyTopic: r.FormValue("ntfy_topic"),
|
||||
NtfyURL: r.FormValue("ntfy_url"),
|
||||
NtfyAPIToken: r.FormValue("ntfy_api_token"),
|
||||
NtfyUsername: r.FormValue("ntfy_username"),
|
||||
NtfyPassword: r.FormValue("ntfy_password"),
|
||||
NtfyIconURL: r.FormValue("ntfy_icon_url"),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue