diff options
author | Javier Peletier <jm@epiclabs.io> | 2018-09-29 07:00:28 +0800 |
---|---|---|
committer | Javier Peletier <jm@epiclabs.io> | 2018-10-03 15:12:06 +0800 |
commit | f1e86ad9cf0470051b7106ee83794d27276b528d (patch) | |
tree | 4a11bd2816200bac0a0e24a3b3c5c79db84e2bf4 /swarm/api/http | |
parent | bd1f7ebda27d57002b6a04a95812420a40117b3a (diff) | |
download | dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.tar dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.tar.gz dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.tar.bz2 dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.tar.lz dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.tar.xz dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.tar.zst dexon-f1e86ad9cf0470051b7106ee83794d27276b528d.zip |
swarm/storage/mru: Renamed all identifiers to Feeds
Diffstat (limited to 'swarm/api/http')
-rw-r--r-- | swarm/api/http/server.go | 8 | ||||
-rw-r--r-- | swarm/api/http/server_test.go | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/swarm/api/http/server.go b/swarm/api/http/server.go index 5ec69373d..4c19dd6df 100644 --- a/swarm/api/http/server.go +++ b/swarm/api/http/server.go @@ -517,7 +517,7 @@ func (s *Server) HandlePostResource(w http.ResponseWriter, r *http.Request) { } var updateRequest mru.Request - updateRequest.View = *view + updateRequest.Feed = *view query := r.URL.Query() if err := updateRequest.FromValues(query, body); err != nil { // decodes request from query parameters @@ -544,7 +544,7 @@ func (s *Server) HandlePostResource(w http.ResponseWriter, r *http.Request) { // we create a manifest so we can retrieve the resource with bzz:// later // this manifest has a special "resource type" manifest, and saves the // resource view ID used to retrieve the resource later - m, err := s.api.NewResourceManifest(r.Context(), &updateRequest.View) + m, err := s.api.NewResourceManifest(r.Context(), &updateRequest.Feed) if err != nil { RespondError(w, r, fmt.Sprintf("failed to create resource manifest: %v", err), http.StatusInternalServerError) return @@ -563,7 +563,7 @@ func (s *Server) HandlePostResource(w http.ResponseWriter, r *http.Request) { } } -// Retrieve mutable resource updates: +// Retrieve Swarm Feeds: // bzz-resource://<id> - get latest update // bzz-resource://<id>/?period=n - get latest update on period n // bzz-resource://<id>/?period=n&version=m - get update version m of period n @@ -606,7 +606,7 @@ func (s *Server) HandleGetResource(w http.ResponseWriter, r *http.Request) { return } - lookupParams := &mru.Query{View: *view} + lookupParams := &mru.Query{Feed: *view} if err = lookupParams.FromValues(r.URL.Query()); err != nil { // parse period, version RespondError(w, r, fmt.Sprintf("invalid mutable resource request:%s", err), http.StatusBadRequest) return diff --git a/swarm/api/http/server_test.go b/swarm/api/http/server_test.go index 817519a30..0855d30a2 100644 --- a/swarm/api/http/server_test.go +++ b/swarm/api/http/server_test.go @@ -206,7 +206,7 @@ func TestBzzResourceMultihash(t *testing.T) { } } -// Test resource updates using the raw update methods +// Test Swarm Feeds using the raw update methods func TestBzzResource(t *testing.T) { srv := testutil.NewTestSwarmServer(t, serverFunc, nil) signer, _ := newTestSigner() @@ -406,7 +406,7 @@ func TestBzzResource(t *testing.T) { // test manifest-less queries log.Info("get first update in update1Timestamp via direct query") - query := mru.NewQuery(&updateRequest.View, update1Timestamp, lookup.NoClue) + query := mru.NewQuery(&updateRequest.Feed, update1Timestamp, lookup.NoClue) urlq, err := url.Parse(fmt.Sprintf("%s/bzz-resource:/", srv.URL)) if err != nil { |