Commit 58879ea7 authored by Janoš Guljaš's avatar Janoš Guljaš Committed by GitHub

support api version path for tags api endpoints (#586)

parent aa15b3a4
...@@ -66,14 +66,13 @@ func (s *server) setupRouting() { ...@@ -66,14 +66,13 @@ func (s *server) setupRouting() {
"GET": http.HandlerFunc(s.bzzDownloadHandler), "GET": http.HandlerFunc(s.bzzDownloadHandler),
}) })
router.Handle("/tags", jsonhttp.MethodHandler{ handle(router, "/tags", jsonhttp.MethodHandler{
"POST": web.ChainHandlers( "POST": web.ChainHandlers(
jsonhttp.NewMaxBodyBytesHandler(1024), jsonhttp.NewMaxBodyBytesHandler(1024),
web.FinalHandlerFunc(s.createTag), web.FinalHandlerFunc(s.createTag),
), ),
}) })
handle(router, "/tags/{id}", jsonhttp.MethodHandler{
router.Handle("/tags/{id}", jsonhttp.MethodHandler{
"GET": http.HandlerFunc(s.getTag), "GET": http.HandlerFunc(s.getTag),
"DELETE": http.HandlerFunc(s.deleteTag), "DELETE": http.HandlerFunc(s.deleteTag),
"PATCH": web.ChainHandlers( "PATCH": web.ChainHandlers(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment