aboutsummaryrefslogtreecommitdiff
path: root/server/ui/form/integration.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net> 2017-12-02 21:12:03 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net> 2017-12-02 21:12:03 -0800
commitae62e543d3a1173cd39f1910cb67c95a56a7a6a4 (patch)
treee086a53f0ad609b648e523dc5198a4d48430ab91 /server/ui/form/integration.go
parent6f5350a4978c7ef6fa68e526ec8a2ba917d33953 (diff)
downloadv2-ae62e543d3a1173cd39f1910cb67c95a56a7a6a4.tar.gz
v2-ae62e543d3a1173cd39f1910cb67c95a56a7a6a4.tar.zst
v2-ae62e543d3a1173cd39f1910cb67c95a56a7a6a4.zip
Add Instapaper integration
Diffstat (limited to 'server/ui/form/integration.go')
-rw-r--r--server/ui/form/integration.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/server/ui/form/integration.go b/server/ui/form/integration.go
index 566adaec..be54e23a 100644
--- a/server/ui/form/integration.go
+++ b/server/ui/form/integration.go
@@ -16,6 +16,9 @@ type IntegrationForm struct {
PinboardToken string
PinboardTags string
PinboardMarkAsUnread bool
+ InstapaperEnabled bool
+ InstapaperUsername string
+ InstapaperPassword string
}
// Merge copy form values to the model.
@@ -24,6 +27,9 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.PinboardToken = i.PinboardToken
integration.PinboardTags = i.PinboardTags
integration.PinboardMarkAsUnread = i.PinboardMarkAsUnread
+ integration.InstapaperEnabled = i.InstapaperEnabled
+ integration.InstapaperUsername = i.InstapaperUsername
+ integration.InstapaperPassword = i.InstapaperPassword
}
// NewIntegrationForm returns a new AuthForm.
@@ -33,5 +39,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
PinboardToken: r.FormValue("pinboard_token"),
PinboardTags: r.FormValue("pinboard_tags"),
PinboardMarkAsUnread: r.FormValue("pinboard_mark_as_unread") == "1",
+ InstapaperEnabled: r.FormValue("instapaper_enabled") == "1",
+ InstapaperUsername: r.FormValue("instapaper_username"),
+ InstapaperPassword: r.FormValue("instapaper_password"),
}
}