mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
refactor(onDelete) body -> files
This commit is contained in:
parent
7c751e3a2f
commit
1b35591da7
1 changed files with 4 additions and 3 deletions
|
|
@ -207,7 +207,9 @@
|
|||
|
||||
case 'DELETE':
|
||||
getBody(p.request, function(body) {
|
||||
onDelete(p.name, body, lQuery, function(error, msg, callback) {
|
||||
var files = Util.parseJSON(body);
|
||||
|
||||
onDelete(p.name, files, lQuery, function(error, msg, callback) {
|
||||
checkSendError(error, params, function() {
|
||||
if (callback)
|
||||
Util.exec(callback);
|
||||
|
|
@ -223,9 +225,8 @@
|
|||
return ret;
|
||||
}
|
||||
|
||||
function onDelete(name, body, query, callback) {
|
||||
function onDelete(name, files, query, callback) {
|
||||
var i, n, onStat,
|
||||
files = Util.parseJSON(body),
|
||||
assync = 0,
|
||||
rmFile = fs.unlink.bind(fs),
|
||||
rmDir = fse.remove.bind(fse),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue