s1llyw0rdz/web/handler/index_show.go
2021-11-22 18:12:07 +01:00

21 lines
359 B
Go

package handler
import (
"net/http"
)
type Update struct {
UpdatedAgo string
Author string
}
func (h *Handler) showIndexView(w http.ResponseWriter, r *http.Request) {
statuses, err := h.storage.LatestStatuses()
if err != nil {
serverError(w, err)
return
}
h.renderLayout(w, "index", map[string]interface{}{
"statuses": statuses,
}, "")
}