コード例 #1
0
ファイル: index.go プロジェクト: caarlos0/cepinator
func Index(ds datastore.Datastore) func(c *echo.Context) error {
	return func(c *echo.Context) error {
		ceps, err := ds.LastUpdatedCeps(10)
		if err != nil {
			c.Error(err)
		}
		return c.JSON(http.StatusOK, ceps)
	}
}