aboutsummaryrefslogtreecommitdiffhomepage
path: root/ui/form
diff options
context:
space:
mode:
authorGravatar Nicolas Carlier <n.carlier@nunux.org>2018-02-25 19:49:08 +0000
committerGravatar fguillot <fred@miniflux.net>2018-02-25 11:49:08 -0800
commit34ce1142313b74e21a74c08c6dbd8d4312d7e336 (patch)
treee536c737e3f6d2512644a23bfead7ab5509aedaa /ui/form
parent3030145b3048245405766c3a73a099af82ba9750 (diff)
Add Nunux Keeper integration
Diffstat (limited to 'ui/form')
-rw-r--r--ui/form/integration.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/ui/form/integration.go b/ui/form/integration.go
index 8cc6d35..f8cadaf 100644
--- a/ui/form/integration.go
+++ b/ui/form/integration.go
@@ -28,6 +28,9 @@ type IntegrationForm struct {
WallabagClientSecret string
WallabagUsername string
WallabagPassword string
+ NunuxKeeperEnabled bool
+ NunuxKeeperURL string
+ NunuxKeeperAPIKey string
}
// Merge copy form values to the model.
@@ -48,6 +51,9 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.WallabagClientSecret = i.WallabagClientSecret
integration.WallabagUsername = i.WallabagUsername
integration.WallabagPassword = i.WallabagPassword
+ integration.NunuxKeeperEnabled = i.NunuxKeeperEnabled
+ integration.NunuxKeeperURL = i.NunuxKeeperURL
+ integration.NunuxKeeperAPIKey = i.NunuxKeeperAPIKey
}
// NewIntegrationForm returns a new AuthForm.
@@ -69,5 +75,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
WallabagClientSecret: r.FormValue("wallabag_client_secret"),
WallabagUsername: r.FormValue("wallabag_username"),
WallabagPassword: r.FormValue("wallabag_password"),
+ NunuxKeeperEnabled: r.FormValue("nunux_keeper_enabled") == "1",
+ NunuxKeeperURL: r.FormValue("nunux_keeper_url"),
+ NunuxKeeperAPIKey: r.FormValue("nunux_keeper_api_key"),
}
}