diff options
author | 2024-04-27 20:35:56 -0700 | |
---|---|---|
committer | 2024-05-02 16:23:00 -0700 | |
commit | ca62b0b36b5f5ecaf13e54f9b4c13c1f745cbfbb (patch) | |
tree | c347a2a565a147ef0924b4c2bfe811485b4874da /internal/ui | |
parent | 7d6a4243c1671bb0a978b32a4a5862f5f9d71da7 (diff) | |
download | v2-ca62b0b36b5f5ecaf13e54f9b4c13c1f745cbfbb.tar.gz v2-ca62b0b36b5f5ecaf13e54f9b4c13c1f745cbfbb.tar.zst v2-ca62b0b36b5f5ecaf13e54f9b4c13c1f745cbfbb.zip |
integration/raindrop: initial draft implementation
Diffstat (limited to 'internal/ui')
-rw-r--r-- | internal/ui/form/integration.go | 12 | ||||
-rw-r--r-- | internal/ui/integration_show.go | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/internal/ui/form/integration.go b/internal/ui/form/integration.go index 7bc5cf91..7809a3ff 100644 --- a/internal/ui/form/integration.go +++ b/internal/ui/form/integration.go @@ -96,6 +96,10 @@ type IntegrationForm struct { OmnivoreEnabled bool OmnivoreAPIKey string OmnivoreURL string + RaindropEnabled bool + RaindropToken string + RaindropCollectionID string + RaindropTags string } // Merge copy form values to the model. @@ -181,6 +185,10 @@ func (i IntegrationForm) Merge(integration *model.Integration) { integration.OmnivoreEnabled = i.OmnivoreEnabled integration.OmnivoreAPIKey = i.OmnivoreAPIKey integration.OmnivoreURL = i.OmnivoreURL + integration.RaindropEnabled = i.RaindropEnabled + integration.RaindropToken = i.RaindropToken + integration.RaindropCollectionID = i.RaindropCollectionID + integration.RaindropTags = i.RaindropTags } // NewIntegrationForm returns a new IntegrationForm. @@ -269,6 +277,10 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm { OmnivoreEnabled: r.FormValue("omnivore_enabled") == "1", OmnivoreAPIKey: r.FormValue("omnivore_api_key"), OmnivoreURL: r.FormValue("omnivore_url"), + RaindropEnabled: r.FormValue("raindrop_enabled") == "1", + RaindropToken: r.FormValue("raindrop_token"), + RaindropCollectionID: r.FormValue("raindrop_collection_id"), + RaindropTags: r.FormValue("raindrop_tags"), } } diff --git a/internal/ui/integration_show.go b/internal/ui/integration_show.go index 03bc73b6..8b3299a4 100644 --- a/internal/ui/integration_show.go +++ b/internal/ui/integration_show.go @@ -110,6 +110,10 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) { OmnivoreEnabled: integration.OmnivoreEnabled, OmnivoreAPIKey: integration.OmnivoreAPIKey, OmnivoreURL: integration.OmnivoreURL, + RaindropEnabled: integration.RaindropEnabled, + RaindropToken: integration.RaindropToken, + RaindropCollectionID: integration.RaindropCollectionID, + RaindropTags: integration.RaindropTags, } sess := session.New(h.store, request.SessionID(r)) |