|
|
@ -5,7 +5,6 @@ import (
|
|
|
|
"html/template"
|
|
|
|
"html/template"
|
|
|
|
"io"
|
|
|
|
"io"
|
|
|
|
|
|
|
|
|
|
|
|
"git.phc.dm.unipi.it/phc/website"
|
|
|
|
|
|
|
|
"git.phc.dm.unipi.it/phc/website/articles"
|
|
|
|
"git.phc.dm.unipi.it/phc/website/articles"
|
|
|
|
"git.phc.dm.unipi.it/phc/website/auth"
|
|
|
|
"git.phc.dm.unipi.it/phc/website/auth"
|
|
|
|
"git.phc.dm.unipi.it/phc/website/model"
|
|
|
|
"git.phc.dm.unipi.it/phc/website/model"
|
|
|
@ -18,7 +17,7 @@ import (
|
|
|
|
type Service interface {
|
|
|
|
type Service interface {
|
|
|
|
HandleStaticPage(w io.Writer, view string, ctx Context) error
|
|
|
|
HandleStaticPage(w io.Writer, view string, ctx Context) error
|
|
|
|
HandleUtenti() ([]*model.User, error)
|
|
|
|
HandleUtenti() ([]*model.User, error)
|
|
|
|
HandleListaUtenti() ([]website.UserInfo, error)
|
|
|
|
HandleListaUtenti() ([]*model.User, error)
|
|
|
|
HandleStoriaPage(w io.Writer, ctx Context) error
|
|
|
|
HandleStoriaPage(w io.Writer, ctx Context) error
|
|
|
|
HandleQueryAppunti(w io.Writer, query string, ctx Context) error
|
|
|
|
HandleQueryAppunti(w io.Writer, query string, ctx Context) error
|
|
|
|
HandleAppuntiCondivisiPage(w io.Writer, ctx Context) error
|
|
|
|
HandleAppuntiCondivisiPage(w io.Writer, ctx Context) error
|
|
|
@ -51,7 +50,7 @@ type DefaultHandler struct {
|
|
|
|
Renderer *templates.TemplateRenderer
|
|
|
|
Renderer *templates.TemplateRenderer
|
|
|
|
NewsArticlesRegistry *articles.Registry
|
|
|
|
NewsArticlesRegistry *articles.Registry
|
|
|
|
GuideArticlesRegistry *articles.Registry
|
|
|
|
GuideArticlesRegistry *articles.Registry
|
|
|
|
ListaUtenti website.ListaUtentiService
|
|
|
|
ListaUtentiService auth.Service
|
|
|
|
Storia storia.StoriaService
|
|
|
|
Storia storia.StoriaService
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -70,8 +69,8 @@ func (h *DefaultHandler) HandleUtenti() ([]*model.User, error) {
|
|
|
|
return utenti, nil
|
|
|
|
return utenti, nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (h *DefaultHandler) HandleListaUtenti() ([]website.UserInfo, error) {
|
|
|
|
func (h *DefaultHandler) HandleListaUtenti() ([]*model.User, error) {
|
|
|
|
utenti, err := h.ListaUtenti.GetUtenti()
|
|
|
|
utenti, err := h.ListaUtentiService.GetUsers()
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return nil, err
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
}
|
|
|
|