// APIRoutes definition // ========== API ROUTES ====== func APIRoutes(api *echo.Group) { // ======= ADMIN API ====== admin := controllers.AdminController{} api.Get("/time", admin.GetTime) posts := controllers.PostsController{} api.GET("/posts/:id", posts.GetOne) api.GET("/posts", posts.Get) api.POST("/posts", posts.Save) api.PUT("/posts/:id", posts.Update) // CRUD /api/tags tags := controllers.TagsController{} api.GET("/tags/:id", tags.GetOne) api.GET("/tags", tags.Get) api.POST("/tags", tags.Save) api.PUT("/tags/:id", tags.Update) /* api.Delete("/tags/:id", tags.Destroy) */ }