Add list API endpoints

This commit is contained in:
Kevin Kandlbinder 2022-03-01 13:39:46 +01:00
parent 1e071ffed4
commit c572bbce85
5 changed files with 275 additions and 2 deletions

View file

@ -31,6 +31,16 @@ func SetupAPI() chi.Router {
r.Get("/{id}", apiHandleBotEntry)
})
router.Route("/lists", func(r chi.Router) {
r.Use(checkAuthMiddleware)
r.Get("/", apiHandleBotListsList)
r.Post("/", apiHandleBotListsPost)
r.Get("/by-name/{name}", apiHandleBotListByName)
r.Get("/{id}", apiHandleBotList)
})
router.Route("/test", func(r chi.Router) {
r.Use(checkAuthMiddleware)