@cryptotaxi247 / kubo / commits / c4d55c7bb

fix compile errors

verokarhu committed Sep 16, 2014 at 20:41 UTC c4d55c7bb741bd8143878c07cc2a423a57dd6747
1 file changed +4 -3
server/http/http.go
+4 -3
@@ -1,11 +1,12 @@
1 package http
2
3 import (
4 + "net/http"
5 +
6 "github.com/gorilla/mux"
7 core "github.com/jbenet/go-ipfs/core"
8 "github.com/jbenet/go-ipfs/importer"
9 mh "github.com/jbenet/go-multihash"
8 - "net/http"
10 )
11
12 type ipfsHandler struct {
@@ -36,13 +37,13 @@ func (i *ipfsHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
37 }
38
39 func ipfsPostHandler(w http.ResponseWriter, r *http.Request, node *core.IpfsNode) {
39 - root, err := importer.NewDagFromReader(r.Body, 1)
40 + root, err := importer.NewDagFromReader(r.Body)
41 if err != nil {
42 w.WriteHeader(http.StatusInternalServerError)
43 return
44 }
45
45 - k, err := node.DAG.Put(root)
46 + k, err := node.DAG.Add(root)
47 if err != nil {
48 w.WriteHeader(http.StatusInternalServerError)
49 return