From 8eff94e1bc68c910fadcaccf7f59274f52fef3f9 Mon Sep 17 00:00:00 2001 From: otofune Date: Tue, 24 Jan 2017 21:50:59 +0900 Subject: [PATCH] [API] resolve deprecation error error detail: DeprecationWarning: Calling an asynchronous function without callback is deprecated. --- src/api/endpoints/drive/files/create.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/api/endpoints/drive/files/create.js b/src/api/endpoints/drive/files/create.js index 5966499c5..c9de93a9c 100644 --- a/src/api/endpoints/drive/files/create.js +++ b/src/api/endpoints/drive/files/create.js @@ -23,7 +23,7 @@ module.exports = (file, params, user) => new Promise(async (res, rej) => { const buffer = fs.readFileSync(file.path); - fs.unlink(file.path); + fs.unlink(file.path, (err) => { if (err) console.log(err) }); // Get 'name' parameter let name = file.originalname;