mirror of
https://github.com/miniflux/v2.git
synced 2025-08-01 17:38:37 +00:00
Add Shiori integration
This commit is contained in:
parent
13d9d86acd
commit
28df0b119e
26 changed files with 312 additions and 13 deletions
|
@ -62,6 +62,10 @@ type IntegrationForm struct {
|
|||
AppriseEnabled bool
|
||||
AppriseURL string
|
||||
AppriseServicesURL string
|
||||
ShioriEnabled bool
|
||||
ShioriURL string
|
||||
ShioriUsername string
|
||||
ShioriPassword string
|
||||
}
|
||||
|
||||
// Merge copy form values to the model.
|
||||
|
@ -115,6 +119,10 @@ func (i IntegrationForm) Merge(integration *model.Integration) {
|
|||
integration.AppriseEnabled = i.AppriseEnabled
|
||||
integration.AppriseServicesURL = i.AppriseServicesURL
|
||||
integration.AppriseURL = i.AppriseURL
|
||||
integration.ShioriEnabled = i.ShioriEnabled
|
||||
integration.ShioriURL = i.ShioriURL
|
||||
integration.ShioriUsername = i.ShioriUsername
|
||||
integration.ShioriPassword = i.ShioriPassword
|
||||
}
|
||||
|
||||
// NewIntegrationForm returns a new IntegrationForm.
|
||||
|
@ -171,5 +179,9 @@ func NewIntegrationForm(r *http.Request) *IntegrationForm {
|
|||
AppriseEnabled: r.FormValue("apprise_enabled") == "1",
|
||||
AppriseURL: r.FormValue("apprise_url"),
|
||||
AppriseServicesURL: r.FormValue("apprise_services_url"),
|
||||
ShioriEnabled: r.FormValue("shiori_enabled") == "1",
|
||||
ShioriURL: r.FormValue("shiori_url"),
|
||||
ShioriUsername: r.FormValue("shiori_username"),
|
||||
ShioriPassword: r.FormValue("shiori_password"),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,6 +77,10 @@ func (h *handler) showIntegrationPage(w http.ResponseWriter, r *http.Request) {
|
|||
AppriseEnabled: integration.AppriseEnabled,
|
||||
AppriseURL: integration.AppriseURL,
|
||||
AppriseServicesURL: integration.AppriseServicesURL,
|
||||
ShioriEnabled: integration.ShioriEnabled,
|
||||
ShioriURL: integration.ShioriURL,
|
||||
ShioriUsername: integration.ShioriUsername,
|
||||
ShioriPassword: integration.ShioriPassword,
|
||||
}
|
||||
|
||||
sess := session.New(h.store, request.SessionID(r))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue