From 34ce1142313b74e21a74c08c6dbd8d4312d7e336 Mon Sep 17 00:00:00 2001 From: Nicolas Carlier Date: Sun, 25 Feb 2018 19:49:08 +0000 Subject: Add Nunux Keeper integration --- storage/integration.go | 18 +++++++++++++++--- storage/migration.go | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'storage') 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() { -- cgit v1.2.3