2019-01-14 20:07:11 +00:00
|
|
|
package channel
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/go-chi/chi"
|
|
|
|
)
|
|
|
|
|
2019-01-16 21:01:48 +00:00
|
|
|
func APIRoutes(s Service) *chi.Mux {
|
2019-01-14 20:07:11 +00:00
|
|
|
router := chi.NewRouter()
|
|
|
|
|
2019-01-16 21:01:48 +00:00
|
|
|
router.Get("/{id}", ChannelAPIHandler(s))
|
|
|
|
router.Get("/", ChannelsAPIHandler(s))
|
2019-01-14 20:07:11 +00:00
|
|
|
|
|
|
|
return router
|
|
|
|
}
|