1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Add Wallabag integration

This commit is contained in:
Frédéric Guillot 2017-12-18 20:52:46 -08:00
parent ce75748cf2
commit b153fa8b3c
17 changed files with 347 additions and 36 deletions

View file

@ -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,
)