Пример #1
0
// Display a movie list
func SeriesList(w http.ResponseWriter, r *http.Request) error {
	s, err := database.ListSeries()
	if err != nil {
		return err
	}

	data := struct {
		Series []*Series
	}{s}

	return RenderTemplate(w, r, "series_list.html", &data)
}
Пример #2
0
// GET /api/movies
// Lists all movies
func SeriesList(w http.ResponseWriter, r *http.Request) (interface{}, error) {
	return database.ListSeries()
}