Skip to content

Commit

Permalink
added log/level endpoint to ipfs
Browse files Browse the repository at this point in the history
  • Loading branch information
ehsan6sha committed Aug 5, 2023
1 parent 1b6bccf commit db5aa55
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions blox/ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,19 @@ func (p *Blox) ServeIpfsRpc() http.Handler {

})

// https://docs.ipfs.tech/reference/kubo/rpc/#api-log-level
mux.HandleFunc("/api/v0/log/level", func(w http.ResponseWriter, r *http.Request) {
resp := struct {
Message string `json:"Message"`
}{
Message: "ignored",
}
if err := json.NewEncoder(w).Encode(resp); err != nil {
log.Errorw("failed to encode response to id", "err", err)
}

})

mux.HandleFunc("/", notFoundHandler)

return mux
Expand Down

0 comments on commit db5aa55

Please sign in to comment.