aboutsummaryrefslogtreecommitdiffhomepage
path: root/storage
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2017-12-18 20:52:46 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2017-12-18 20:52:46 -0800
commitb153fa8b3cd2e48bbe13326695f11d2013427ebc (patch)
treef1329af7075a8b618a58cc86434a55ffcf7ddc12 /storage
parentce75748cf25d05f795b0ec8c659824345c7f3868 (diff)
Add Wallabag integration
Diffstat (limited to 'storage')
-rw-r--r--storage/integration.go30
-rw-r--r--storage/migration.go2
2 files changed, 28 insertions, 4 deletions
diff --git a/storage/integration.go b/storage/integration.go
index 6d89a68..779ca81 100644
--- a/storage/integration.go
+++ b/storage/integration.go
@@ -47,7 +47,13 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
fever_enabled,
fever_username,
fever_password,
- fever_token
+ fever_token,
+ wallabag_enabled,
+ wallabag_url,
+ wallabag_client_id,
+ wallabag_client_secret,
+ wallabag_username,
+ wallabag_password
FROM integrations
WHERE user_id=$1
`
@@ -65,6 +71,12 @@ func (s *Storage) Integration(userID int64) (*model.Integration, error) {
&integration.FeverUsername,
&integration.FeverPassword,
&integration.FeverToken,
+ &integration.WallabagEnabled,
+ &integration.WallabagURL,
+ &integration.WallabagClientID,
+ &integration.WallabagClientSecret,
+ &integration.WallabagUsername,
+ &integration.WallabagPassword,
)
switch {
case err == sql.ErrNoRows:
@@ -90,8 +102,14 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
fever_enabled=$8,
fever_username=$9,
fever_password=$10,
- fever_token=$11
- WHERE user_id=$12
+ fever_token=$11,
+ wallabag_enabled=$12,
+ wallabag_url=$13,
+ wallabag_client_id=$14,
+ wallabag_client_secret=$15,
+ wallabag_username=$16,
+ wallabag_password=$17
+ WHERE user_id=$18
`
_, err := s.db.Exec(
query,
@@ -106,6 +124,12 @@ func (s *Storage) UpdateIntegration(integration *model.Integration) error {
integration.FeverUsername,
integration.FeverPassword,
integration.FeverToken,
+ integration.WallabagEnabled,
+ integration.WallabagURL,
+ integration.WallabagClientID,
+ integration.WallabagClientSecret,
+ integration.WallabagUsername,
+ integration.WallabagPassword,
integration.UserID,
)
diff --git a/storage/migration.go b/storage/migration.go
index d29c76d..0408330 100644
--- a/storage/migration.go
+++ b/storage/migration.go
@@ -12,7 +12,7 @@ import (
"github.com/miniflux/miniflux/sql"
)
-const schemaVersion = 10
+const schemaVersion = 11
// Migrate run database migrations.
func (s *Storage) Migrate() {