Minor fixes

This commit is contained in:
2022-08-18 18:26:38 +02:00
parent 227619e5eb
commit 860cc76503
6 changed files with 23 additions and 7 deletions
+10
View File
@@ -16,6 +16,7 @@ import (
type Service interface {
HandleStaticPage(w io.Writer, view string, ctx Context) error
HandleUtenti() ([]*model.User, error)
HandleListaUtenti() ([]website.UserInfo, error)
HandleStoriaPage(w io.Writer, ctx Context) error
HandleQueryAppunti(w io.Writer, query string, ctx Context) error
HandleNewsPage(w io.Writer, ctx Context) error
@@ -61,6 +62,15 @@ func (h *DefaultHandler) HandleUtenti() ([]*model.User, error) {
return utenti, nil
}
func (h *DefaultHandler) HandleListaUtenti() ([]website.UserInfo, error) {
utenti, err := h.ListaUtenti.GetUtenti()
if err != nil {
return nil, err
}
return utenti, nil
}
func (h *DefaultHandler) HandleStoriaPage(w io.Writer, ctx Context) error {
storia, err := h.Storia.GetStoria()
if err != nil {