diff --git a/middleware/Vegetables.js b/middleware/Vegetables.js index 84f7024..5573660 100644 --- a/middleware/Vegetables.js +++ b/middleware/Vegetables.js @@ -120,7 +120,7 @@ class Vegetables { let thumb = new Resize() let large = new Resize() const key = uuid() - let _create = function () { + let _create = () => { if (uploaded === 2) { this._createItem(req, callback) fs.unlink(req.file.path, () => {}) @@ -216,7 +216,7 @@ class Vegetables { this._deleteMedias(item.mainPicture) } - let _patch = function () { + let _patch = () => { if (uploaded === 2) { this._patchOne(item, values, callback) fs.unlink(req.file.path, () => {})