aboutsummaryrefslogtreecommitdiffhomepage
path: root/storage
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 /storage
parent3030145b3048245405766c3a73a099af82ba9750 (diff)
Add Nunux Keeper integration
Diffstat (limited to 'storage')
-rw-r--r--storage/integration.go18
-rw-r--r--storage/migration.go2
2 files changed, 16 insertions, 4 deletions
diff --git a/storage/integration.go b/storage/integration.go
index aacb520..5a60d85 100644
--- a/storage/integration.go
+++ b/storage/integration.go
@@ -67,7 +67,10 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
wallabag_client_id,
wallabag_client_secret,
wallabag_username,
- wallabag_password
+ wallabag_password,
+ nunux_keeper_enabled,
+ nunux_keeper_url,
+ nunux_keeper_api_key
FROM integrations
WHERE user_id=$1
`
@@ -91,6 +94,9 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
&integration.WallabagClientSecret,
&integration.WallabagUsername,
&integration.WallabagPassword,
+ &integration.NunuxKeeperEnabled,
+ &integration.NunuxKeeperURL,
+ &integration.NunuxKeeperAPIKey,
)
switch {
case err == sql.ErrNoRows:
@@ -122,8 +128,11 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
wallabag_client_id=$14,
wallabag_client_secret=$15,
wallabag_username=$16,
- wallabag_password=$17
- WHERE user_id=$18
+ wallabag_password=$17,
+ nunux_keeper_enabled=$18,
+ nunux_keeper_url=$19,
+ nunux_keeper_api_key=$20
+ WHERE user_id=$21
`
_, err := s.db.Exec(
query,
@@ -144,6 +153,9 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
integration.WallabagClientSecret,
integration.WallabagUsername,
integration.WallabagPassword,
+ integration.NunuxKeeperEnabled,
+ integration.NunuxKeeperURL,
+ integration.NunuxKeeperAPIKey,
integration.UserID,
)
diff --git a/storage/migration.go b/storage/migration.go
index 73267ec..ed219de 100644
--- a/storage/migration.go
+++ b/storage/migration.go
@@ -12,7 +12,7 @@ import (
"github.com/miniflux/miniflux/sql"
)
-const schemaVersion = 13
+const schemaVersion = 14
// Migrate run database migrations.
func (s *Storage) Migrate() {