1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

Remove completely generated files

This commit is contained in:
Frédéric Guillot 2021-02-18 21:33:29 -08:00 committed by fguillot
parent 4855fbd13f
commit c2571f9f47
44 changed files with 79 additions and 2358 deletions

View file

@ -8,6 +8,7 @@ import (
"net/http"
"miniflux.app/config"
"miniflux.app/logger"
"miniflux.app/storage"
"miniflux.app/template"
"miniflux.app/worker"
@ -19,7 +20,13 @@ import (
// Serve declares all routes for the user interface.
func Serve(router *mux.Router, store *storage.Storage, pool *worker.Pool) {
middleware := newMiddleware(router, store)
handler := &handler{router, store, template.NewEngine(router), pool}
templateEngine := template.NewEngine(router)
if err := templateEngine.ParseTemplates(); err != nil {
logger.Fatal(`Unable to parse templates: %v`, err)
}
handler := &handler{router, store, templateEngine, pool}
uiRouter := router.NewRoute().Subrouter()
uiRouter.Use(middleware.handleUserSession)

View file

@ -28,7 +28,7 @@ func (v *View) Set(param string, value interface{}) *View {
// Render executes the template with arguments.
func (v *View) Render(template string) []byte {
return v.tpl.Render(template, request.UserLanguage(v.r), v.params)
return v.tpl.Render(template+".html", request.UserLanguage(v.r), v.params)
}
// New returns a new view with default parameters.