Commit 7999c878 authored by Tristan Cavelier's avatar Tristan Cavelier

metadata `modified` is not mandatory anymore

parent b1c2d820
......@@ -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);
......
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