aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/files.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/files.js')
-rw-r--r--src/files.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/files.js b/src/files.js
index 48f91a8..6946ff3 100644
--- a/src/files.js
+++ b/src/files.js
@@ -3,7 +3,7 @@
3var fs = require('fs'), 3var fs = require('fs'),
4 path = require('path'), 4 path = require('path'),
5 ejs = require('ejs'), 5 ejs = require('ejs'),
6 rimraf = require('rimraf'), 6 rm = require('del'),
7 debug = require('debug')('files'), 7 debug = require('debug')('files'),
8 mkdirp = require('mkdirp'), 8 mkdirp = require('mkdirp'),
9 HttpError = require('connect-lastmile').HttpError, 9 HttpError = require('connect-lastmile').HttpError,
@@ -116,9 +116,9 @@ function del(req, res, next) {
116 fs.stat(absoluteFilePath, function (error, result) { 116 fs.stat(absoluteFilePath, function (error, result) {
117 if (error) return next(new HttpError(404, error)); 117 if (error) return next(new HttpError(404, error));
118 118
119 rimraf(absoluteFilePath, function (error) { 119 rm(absoluteFilePath, function (error, result) {
120 if (error) return next(new HttpError(500, 'Unable to remove')); 120 if (error) return next(new HttpError(500, 'Unable to remove'));
121 next(new HttpSuccess(200, {})); 121 next(new HttpSuccess(200, { entries: result }));
122 }); 122 });
123 }); 123 });
124} 124}