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

@ -40,6 +40,12 @@ func (c *Controller) ShowIntegrations(ctx *core.Context, request *core.Request,
FeverEnabled: integration.FeverEnabled,
FeverUsername: integration.FeverUsername,
FeverPassword: integration.FeverPassword,
WallabagEnabled: integration.WallabagEnabled,
WallabagURL: integration.WallabagURL,
WallabagClientID: integration.WallabagClientID,
WallabagClientSecret: integration.WallabagClientSecret,
WallabagUsername: integration.WallabagUsername,
WallabagPassword: integration.WallabagPassword,
},
}))
}

View file

@ -22,6 +22,12 @@ type IntegrationForm struct {
FeverEnabled bool
FeverUsername string
FeverPassword string
WallabagEnabled bool
WallabagURL string
WallabagClientID string
WallabagClientSecret string
WallabagUsername string
WallabagPassword string
}
// Merge copy form values to the model.
@ -36,6 +42,12 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.FeverEnabled = i.FeverEnabled
integration.FeverUsername = i.FeverUsername
integration.FeverPassword = i.FeverPassword
integration.WallabagEnabled = i.WallabagEnabled
integration.WallabagURL = i.WallabagURL
integration.WallabagClientID = i.WallabagClientID
integration.WallabagClientSecret = i.WallabagClientSecret
integration.WallabagUsername = i.WallabagUsername
integration.WallabagPassword = i.WallabagPassword
}
// NewIntegrationForm returns a new AuthForm.
@ -51,5 +63,11 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
FeverEnabled: r.FormValue("fever_enabled") == "1",
FeverUsername: r.FormValue("fever_username"),
FeverPassword: r.FormValue("fever_password"),
WallabagEnabled: r.FormValue("wallabag_enabled") == "1",
WallabagURL: r.FormValue("wallabag_url"),
WallabagClientID: r.FormValue("wallabag_client_id"),
WallabagClientSecret: r.FormValue("wallabag_client_secret"),
WallabagUsername: r.FormValue("wallabag_username"),
WallabagPassword: r.FormValue("wallabag_password"),
}
}