|
@@ -41,6 +41,8 @@ type IntegrationForm struct {
|
|
|
EspialURL string
|
|
EspialURL string
|
|
|
EspialAPIKey string
|
|
EspialAPIKey string
|
|
|
EspialTags string
|
|
EspialTags string
|
|
|
|
|
+ ReadwiseEnabled bool
|
|
|
|
|
+ ReadwiseAPIKey string
|
|
|
PocketEnabled bool
|
|
PocketEnabled bool
|
|
|
PocketAccessToken string
|
|
PocketAccessToken string
|
|
|
PocketConsumerKey string
|
|
PocketConsumerKey string
|
|
@@ -89,6 +91,8 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|
|
integration.EspialURL = i.EspialURL
|
|
integration.EspialURL = i.EspialURL
|
|
|
integration.EspialAPIKey = i.EspialAPIKey
|
|
integration.EspialAPIKey = i.EspialAPIKey
|
|
|
integration.EspialTags = i.EspialTags
|
|
integration.EspialTags = i.EspialTags
|
|
|
|
|
+ integration.ReadwiseEnabled = i.ReadwiseEnabled
|
|
|
|
|
+ integration.ReadwiseAPIKey = i.ReadwiseAPIKey
|
|
|
integration.PocketEnabled = i.PocketEnabled
|
|
integration.PocketEnabled = i.PocketEnabled
|
|
|
integration.PocketAccessToken = i.PocketAccessToken
|
|
integration.PocketAccessToken = i.PocketAccessToken
|
|
|
integration.PocketConsumerKey = i.PocketConsumerKey
|
|
integration.PocketConsumerKey = i.PocketConsumerKey
|
|
@@ -140,6 +144,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|
|
EspialURL: r.FormValue("espial_url"),
|
|
EspialURL: r.FormValue("espial_url"),
|
|
|
EspialAPIKey: r.FormValue("espial_api_key"),
|
|
EspialAPIKey: r.FormValue("espial_api_key"),
|
|
|
EspialTags: r.FormValue("espial_tags"),
|
|
EspialTags: r.FormValue("espial_tags"),
|
|
|
|
|
+ ReadwiseEnabled: r.FormValue("readwise_enabled") == "1",
|
|
|
|
|
+ ReadwiseAPIKey: r.FormValue("readwise_api_key"),
|
|
|
PocketEnabled: r.FormValue("pocket_enabled") == "1",
|
|
PocketEnabled: r.FormValue("pocket_enabled") == "1",
|
|
|
PocketAccessToken: r.FormValue("pocket_access_token"),
|
|
PocketAccessToken: r.FormValue("pocket_access_token"),
|
|
|
PocketConsumerKey: r.FormValue("pocket_consumer_key"),
|
|
PocketConsumerKey: r.FormValue("pocket_consumer_key"),
|