mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-20 18:18:56 +00:00
refactor(rest) onPUT: error to top
This commit is contained in:
parent
772c7ed2ef
commit
4a469ef1a5
1 changed files with 4 additions and 3 deletions
|
|
@ -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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue