Linkwarden
diff --git a/internal/ui/form/integration.go b/internal/ui/form/integration.go
index 170043e4..4d4e29c3 100644
--- a/internal/ui/form/integration.go
+++ b/internal/ui/form/integration.go
@@ -62,6 +62,11 @@ type IntegrationForm struct {
LinkdingAPIKey string
LinkdingTags string
LinkdingMarkAsUnread bool
+ LinktacoEnabled bool
+ LinktacoAPIToken string
+ LinktacoOrgSlug string
+ LinktacoTags string
+ LinktacoVisibility string
LinkwardenEnabled bool
LinkwardenURL string
LinkwardenAPIKey string
@@ -175,6 +180,11 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.LinkdingAPIKey = i.LinkdingAPIKey
integration.LinkdingTags = i.LinkdingTags
integration.LinkdingMarkAsUnread = i.LinkdingMarkAsUnread
+ integration.LinktacoEnabled = i.LinktacoEnabled
+ integration.LinktacoAPIToken = i.LinktacoAPIToken
+ integration.LinktacoOrgSlug = i.LinktacoOrgSlug
+ integration.LinktacoTags = i.LinktacoTags
+ integration.LinktacoVisibility = i.LinktacoVisibility
integration.LinkwardenEnabled = i.LinkwardenEnabled
integration.LinkwardenURL = i.LinkwardenURL
integration.LinkwardenAPIKey = i.LinkwardenAPIKey
@@ -290,6 +300,11 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
LinkdingAPIKey: r.FormValue("linkding_api_key"),
LinkdingTags: r.FormValue("linkding_tags"),
LinkdingMarkAsUnread: r.FormValue("linkding_mark_as_unread") == "1",
+ LinktacoEnabled: r.FormValue("linktaco_enabled") == "1",
+ LinktacoAPIToken: r.FormValue("linktaco_api_token"),
+ LinktacoOrgSlug: r.FormValue("linktaco_org_slug"),
+ LinktacoTags: r.FormValue("linktaco_tags"),
+ LinktacoVisibility: r.FormValue("linktaco_visibility"),
LinkwardenEnabled: r.FormValue("linkwarden_enabled") == "1",
LinkwardenURL: r.FormValue("linkwarden_url"),
LinkwardenAPIKey: r.FormValue("linkwarden_api_key"),
diff --git a/internal/ui/integration_show.go b/internal/ui/integration_show.go
index afd2571e..d26c02cc 100644
--- a/internal/ui/integration_show.go
+++ b/internal/ui/integration_show.go
@@ -75,6 +75,11 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
LinkdingAPIKey: integration.LinkdingAPIKey,
LinkdingTags: integration.LinkdingTags,
LinkdingMarkAsUnread: integration.LinkdingMarkAsUnread,
+ LinktacoEnabled: integration.LinktacoEnabled,
+ LinktacoAPIToken: integration.LinktacoAPIToken,
+ LinktacoOrgSlug: integration.LinktacoOrgSlug,
+ LinktacoTags: integration.LinktacoTags,
+ LinktacoVisibility: integration.LinktacoVisibility,
LinkwardenEnabled: integration.LinkwardenEnabled,
LinkwardenURL: integration.LinkwardenURL,
LinkwardenAPIKey: integration.LinkwardenAPIKey,
diff --git a/internal/ui/integration_update.go b/internal/ui/integration_update.go
index a06568cc..518ed7a1 100644
--- a/internal/ui/integration_update.go
+++ b/internal/ui/integration_update.go
@@ -75,6 +75,17 @@ func (h *handler) updateIntegration(w http.ResponseWriter, r *http.Request) {
integration.WebhookSecret = ""
}
+ if integrationForm.LinktacoEnabled {
+ if integrationForm.LinktacoAPIToken == "" || integrationForm.LinktacoOrgSlug == "" {
+ sess.NewFlashErrorMessage(printer.Print("error.linktaco_missing_required_fields"))
+ html.Redirect(w, r, route.Path(h.router, "integrations"))
+ return
+ }
+ if integration.LinktacoVisibility == "" {
+ integration.LinktacoVisibility = "PUBLIC"
+ }
+ }
+
err = h.store.UpdateIntegration(integration)
if err != nil {
html.ServerError(w, r, err)