diff --git a/api/block/handle.go b/api/block/handle.go index aa875be..462b3b2 100644 --- a/api/block/handle.go +++ b/api/block/handle.go @@ -44,7 +44,7 @@ func (h *blockHandler) handleBlock(w http.ResponseWriter, r *http.Request) { return } - blockPath := r.URL.Path[len("/api/block/"):] + blockPath := chi.URLParam(r, "blockPath") block, err := LoadBlock(blockPath, h.cfg) if err != nil { http.Error(w, err.Error(), http.StatusInternalServerError)