Skip to content

Commit 3bcbb05

Browse files
committed
Reverting. Will work on this in a separate PR.
1 parent 26c71ae commit 3bcbb05

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

lib/backend.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -772,11 +772,9 @@ Backend.prototype._fetchSnapshot = function(collection, id, version, callback) {
772772
var db = this.db;
773773
var backend = this;
774774

775-
var options = {metadata: true};
776-
var fields = null;
777775
var shouldGetLatestSnapshot = version === null;
778776
if (shouldGetLatestSnapshot) {
779-
return backend.db.getSnapshot(collection, id, fields, options, function(error, snapshot) {
777+
return backend.db.getSnapshot(collection, id, null, null, function(error, snapshot) {
780778
if (error) return callback(error);
781779

782780
callback(null, snapshot);
@@ -791,7 +789,7 @@ Backend.prototype._fetchSnapshot = function(collection, id, version, callback) {
791789
// - we want to avoid the 'op' middleware, because we later use the 'readSnapshots' middleware in _sanitizeSnapshots
792790
// - we handle the projection in _sanitizeSnapshots
793791
var from = milestoneSnapshot ? milestoneSnapshot.v : 0;
794-
db.getOps(collection, id, from, version, options, function(error, ops) {
792+
db.getOps(collection, id, from, version, null, function(error, ops) {
795793
if (error) return callback(error);
796794

797795
backend._buildSnapshotFromOps(id, milestoneSnapshot, ops, function(error, snapshot) {
@@ -845,12 +843,9 @@ Backend.prototype._fetchSnapshotByTimestamp = function(collection, id, timestamp
845843
var from = 0;
846844
var to = null;
847845

848-
var options = {metadata: true};
849-
var fields = null;
850-
851846
var shouldGetLatestSnapshot = timestamp === null;
852847
if (shouldGetLatestSnapshot) {
853-
return backend.db.getSnapshot(collection, id, fields, options, function(error, snapshot) {
848+
return backend.db.getSnapshot(collection, id, null, null, function(error, snapshot) {
854849
if (error) return callback(error);
855850

856851
callback(null, snapshot);
@@ -866,6 +861,7 @@ Backend.prototype._fetchSnapshotByTimestamp = function(collection, id, timestamp
866861
if (error) return callback(error);
867862
if (snapshot) to = snapshot.v;
868863

864+
var options = {metadata: true};
869865
db.getOps(collection, id, from, to, options, function(error, ops) {
870866
if (error) return callback(error);
871867
filterOpsInPlaceBeforeTimestamp(ops, timestamp);

0 commit comments

Comments
 (0)