1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

feat(integration): add cubox integration

Signed-off-by: Shaolong Chen <shaolong.chen@outlook.it>
This commit is contained in:
Shaolong Chen 2024-10-18 13:18:17 +08:00 committed by Frédéric Guillot
parent 3b654fefa7
commit 366928b35d
26 changed files with 173 additions and 4 deletions

View file

@ -110,6 +110,8 @@ type IntegrationForm struct {
NtfyUsername string
NtfyPassword string
NtfyIconURL string
CuboxEnabled bool
CuboxAPILink string
}
// Merge copy form values to the model.
@ -209,6 +211,8 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.NtfyUsername = i.NtfyUsername
integration.NtfyPassword = i.NtfyPassword
integration.NtfyIconURL = i.NtfyIconURL
integration.CuboxEnabled = i.CuboxEnabled
integration.CuboxAPILink = i.CuboxAPILink
}
// NewIntegrationForm returns a new IntegrationForm.
@ -311,6 +315,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
NtfyUsername: r.FormValue("ntfy_username"),
NtfyPassword: r.FormValue("ntfy_password"),
NtfyIconURL: r.FormValue("ntfy_icon_url"),
CuboxEnabled: r.FormValue("cubox_enabled") == "1",
CuboxAPILink: r.FormValue("cubox_api_link"),
}
}