Commit 7f891a96 authored by Tristan Cavelier's avatar Tristan Cavelier

Removing unneeded validations

parent 2bd2778e
......@@ -10,22 +10,6 @@ var postCommand = function(spec, my) {
return 'post';
};
/**
* Validates the storage handler.
* @param {object} handler The storage handler
*/
that.validate = function () {
if (typeof that.getDocInfo('content') !== 'string') {
that.error({
status:21,statusText:'Content Required',
error:'content_required',
message:'No data to put.',reason:'no data to put'
});
return false;
}
return that.validateState();
};
that.executeOn = function(storage) {
storage.post (that);
};
......
......@@ -15,14 +15,6 @@ var putCommand = function(spec, my) {
* @param {object} handler The storage handler
*/
that.validate = function () {
if (typeof that.getDocInfo('content') !== 'string') {
that.error({
status:21,statusText:'Content Required',
error:'content_required',
message:'No data to put.',reason:'no data to put'
});
return false;
}
return that.validateState();
};
......
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