refactor(rest) onPUT: error to top

This commit is contained in:
coderaiser 2013-11-21 14:48:39 +00:00
parent 772c7ed2ef
commit 4a469ef1a5

View file

@ -364,14 +364,15 @@
break;
case 'mv':
if( Util.checkObjTrue(lFiles, ['from', 'to']) )
if(!Util.checkObjTrue(lFiles, ['from', 'to']) )
sendError(pParams, p.data);
else
fs.rename(lFiles.from, lFiles.to, function(pError) {
checkSendError(pError, pParams, function() {
sendResponse(pParams);
});
});
else
sendError(pParams, p.data);
break;
case 'cp':