mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-05-15 18:06:58 +02:00
Add list API endpoints
This commit is contained in:
parent
1e071ffed4
commit
c572bbce85
5 changed files with 275 additions and 2 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue