Commit 0b73a48b authored by Matt Bell's avatar Matt Bell Committed by Juan Batiz-Benet

commands/http: Made Handler set request contexts

parent 3f4da97c
......@@ -20,6 +20,8 @@ var Daemon = &cmds.Command{
}
func daemonFunc(req cmds.Request, res cmds.Response) {
// TODO: spin up a core.IpfsNode
ctx := req.Context()
lk, err := daemon.Lock(ctx.ConfigRoot)
......@@ -41,7 +43,7 @@ func daemonFunc(req cmds.Request, res cmds.Response) {
return
}
handler := cmdsHttp.Handler{}
handler := cmdsHttp.Handler{*ctx}
http.Handle(cmdsHttp.ApiPath+"/", handler)
err = http.ListenAndServe(host, nil)
if err != nil {
......
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