diff options
author | Allan Reyes <allanbreyes@users.noreply.github.com> | 2018-05-20 13:31:56 -0700 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-05-20 13:31:56 -0700 |
commit | 0f3f5e442f81d37a03618d0df5ea8f0524a24029 (patch) | |
tree | cdd430707b2eeafa436784d382e531fa699208e9 /ui/form | |
parent | f19ab21b7d7dcddb3de0536c272cb22d581eb8d7 (diff) |
Add Pocket integration
Diffstat (limited to 'ui/form')
-rw-r--r-- | ui/form/integration.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/form/integration.go b/ui/form/integration.go index f8cadaf..db095aa 100644 --- a/ui/form/integration.go +++ b/ui/form/integration.go @@ -31,6 +31,9 @@ type IntegrationForm struct { NunuxKeeperEnabled bool NunuxKeeperURL string NunuxKeeperAPIKey string + PocketEnabled bool + PocketAccessToken string + PocketConsumerKey string } // Merge copy form values to the model. @@ -54,6 +57,9 @@ func (i IntegrationForm) Merge(integration *model.Integration) { integration.NunuxKeeperEnabled = i.NunuxKeeperEnabled integration.NunuxKeeperURL = i.NunuxKeeperURL integration.NunuxKeeperAPIKey = i.NunuxKeeperAPIKey + integration.PocketEnabled = i.PocketEnabled + integration.PocketAccessToken = i.PocketAccessToken + integration.PocketConsumerKey = i.PocketConsumerKey } // NewIntegrationForm returns a new AuthForm. @@ -78,5 +84,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm { NunuxKeeperEnabled: r.FormValue("nunux_keeper_enabled") == "1", NunuxKeeperURL: r.FormValue("nunux_keeper_url"), NunuxKeeperAPIKey: r.FormValue("nunux_keeper_api_key"), + PocketEnabled: r.FormValue("pocket_enabled") == "1", + PocketAccessToken: r.FormValue("pocket_access_token"), + PocketConsumerKey: r.FormValue("pocket_consumer_key"), } } |