Commit 2bd2778e authored by Tristan Cavelier's avatar Tristan Cavelier

command.js can generate doc uuid

parent 80087264
...@@ -21,11 +21,12 @@ var command = function(spec, my) { ...@@ -21,11 +21,12 @@ var command = function(spec, my) {
priv.tried = 0; priv.tried = 0;
priv.doc = spec.doc || {}; priv.doc = spec.doc || {};
priv.doc._id = priv.doc._id || generateUuid();
priv.docid = spec.docid || ''; priv.docid = spec.docid || '';
priv.option = spec.options || {};
priv.content = typeof spec.content === 'string'? priv.content = typeof spec.content === 'string'?
spec.content: spec.content:
undefined; undefined;
priv.option = spec.options || {};
priv.callbacks = spec.callbacks || {}; priv.callbacks = spec.callbacks || {};
priv.success = priv.callbacks.success || function (){}; priv.success = priv.callbacks.success || function (){};
priv.error = priv.callbacks.error || function (){}; priv.error = priv.callbacks.error || function (){};
......
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