Aggiunta pagina per appunti condivisi con setup minimale di Preact

This commit is contained in:
2022-08-27 22:58:13 +02:00
parent 5337849bc7
commit 6e90f8c32f
7 changed files with 465 additions and 1 deletions
+7
View File
@@ -20,6 +20,7 @@ type Service interface {
HandleListaUtenti() ([]website.UserInfo, error)
HandleStoriaPage(w io.Writer, ctx Context) error
HandleQueryAppunti(w io.Writer, query string, ctx Context) error
HandleAppuntiCondivisiPage(w io.Writer, ctx Context) error
HandleNewsPage(w io.Writer, ctx Context) error
HandleGuidePage(w io.Writer, ctx Context) error
HandleLogin(username, password string) (*model.Session, error)
@@ -96,6 +97,12 @@ func (h *DefaultHandler) HandleQueryAppunti(w io.Writer, query string, ctx Conte
})
}
func (h *DefaultHandler) HandleAppuntiCondivisiPage(w io.Writer, ctx Context) error {
return h.Renderer.Render(w, "appunti-condivisi.html", util.Map{
"User": ctx.getUser(),
})
}
func (h *DefaultHandler) HandleNewsPage(w io.Writer, ctx Context) error {
articles, err := h.NewsArticlesRegistry.GetArticles()
if err != nil {