From 7999c878e492c50b0f8a4cb8aef38f5a488744dc Mon Sep 17 00:00:00 2001 From: Tristan Cavelier <tristan.cavelier@tiolive.com> Date: Wed, 9 Apr 2014 17:58:31 +0200 Subject: [PATCH] metadata `modified` is not mandatory anymore --- src/jio.storage/replicatestorage.js | 32 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/jio.storage/replicatestorage.js b/src/jio.storage/replicatestorage.js index 0188470..f3607a2 100644 --- a/src/jio.storage/replicatestorage.js +++ b/src/jio.storage/replicatestorage.js @@ -340,14 +340,14 @@ ReplicateStorage.prototype.post = function (command, metadata, option) { var promise_list = [], index, length = this._storage_list.length; - if (!isDate(metadata.modified)) { - command.error( - 409, - "invalid 'modified' metadata", - "The metadata 'modified' should be a valid date string or date object" - ); - return; - } + // if (!isDate(metadata.modified)) { + // command.error( + // 409, + // "invalid 'modified' metadata", + // "The metadata 'modified' should be a valid date string or date object" + // ); + // return; + // } for (index = 0; index < length; index += 1) { promise_list[index] = success( command.storage(this._storage_list[index]).post(metadata, option) @@ -360,14 +360,14 @@ ReplicateStorage.prototype.put = function (command, metadata, option) { var promise_list = [], index, length = this._storage_list.length; - if (!isDate(metadata.modified)) { - command.error( - 409, - "invalid 'modified' metadata", - "The metadata 'modified' should be a valid date string or date object" - ); - return; - } + // if (!isDate(metadata.modified)) { + // command.error( + // 409, + // "invalid 'modified' metadata", + // "The metadata 'modified' should be a valid date string or date object" + // ); + // return; + // } for (index = 0; index < length; index += 1) { promise_list[index] = command.storage(this._storage_list[index]).put(metadata, option); -- 2.30.9