Commit 66f3169d authored by Tristan Cavelier's avatar Tristan Cavelier

command.js allow id with spaces

parent 28962723
...@@ -157,13 +157,13 @@ var command = function (spec, my) { ...@@ -157,13 +157,13 @@ var command = function (spec, my) {
* @param {object} storage The storage. * @param {object} storage The storage.
*/ */
that.validate = function (storage) { that.validate = function (storage) {
if (typeof priv.doc._id === "string" && priv.doc._id.match(" ")) { if (typeof priv.doc._id === "string" && priv.doc._id === "") {
that.error({ that.error({
"status": 21, "status": 21,
"statusText": "Invalid Document Id", "statusText": "Invalid Document Id",
"error": "invalid_document_id", "error": "invalid_document_id",
"message": "The document id is invalid", "message": "The document id is invalid",
"reason": "The document id contains spaces" "reason": "empty"
}); });
return false; return false;
} }
......
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