1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-15 18:57:04 +00:00

Add Shaarli integration

This commit is contained in:
Frédéric Guillot 2023-08-13 14:30:57 -07:00
parent 28df0b119e
commit 9f465fd70d
26 changed files with 256 additions and 21 deletions

View file

@ -66,6 +66,9 @@ type IntegrationForm struct {
ShioriURL string
ShioriUsername string
ShioriPassword string
ShaarliEnabled bool
ShaarliURL string
ShaarliAPISecret string
}
// Merge copy form values to the model.
@ -123,6 +126,9 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
integration.ShioriURL = i.ShioriURL
integration.ShioriUsername = i.ShioriUsername
integration.ShioriPassword = i.ShioriPassword
integration.ShaarliEnabled = i.ShaarliEnabled
integration.ShaarliURL = i.ShaarliURL
integration.ShaarliAPISecret = i.ShaarliAPISecret
}
// NewIntegrationForm returns a new IntegrationForm.
@ -183,5 +189,8 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
ShioriURL: r.FormValue("shiori_url"),
ShioriUsername: r.FormValue("shiori_username"),
ShioriPassword: r.FormValue("shiori_password"),
ShaarliEnabled: r.FormValue("shaarli_enabled") == "1",
ShaarliURL: r.FormValue("shaarli_url"),
ShaarliAPISecret: r.FormValue("shaarli_api_secret"),
}
}