Espial
diff --git a/internal/ui/form/integration.go b/internal/ui/form/integration.go
index a60e9100..0852123b 100644
--- a/internal/ui/form/integration.go
+++ b/internal/ui/form/integration.go
@@ -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"),
}
}
diff --git a/internal/ui/integration_show.go b/internal/ui/integration_show.go
index 8cc3bfe6..1395fab2 100644
--- a/internal/ui/integration_show.go
+++ b/internal/ui/integration_show.go
@@ -124,6 +124,8 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
NtfyUsername: integration.NtfyUsername,
NtfyPassword: integration.NtfyPassword,
NtfyIconURL: integration.NtfyIconURL,
+ CuboxEnabled: integration.CuboxEnabled,
+ CuboxAPILink: integration.CuboxAPILink,
}
sess := session.New(h.store, request.SessionID(r))