summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorotofune <otofune@gmail.com>2017-01-24 21:50:59 +0900
committerotofune <otofune@gmail.com>2017-01-24 08:34:06 -0500
commitc5a73ab2d4262ad0c3ca2554e76dea80e3ecf40d (patch)
tree53db16bded65ea2d6246c57060ee26014e735a4c /src/api
parent[API] Fix bu (diff)
downloadsharkey-c5a73ab2d4262ad0c3ca2554e76dea80e3ecf40d.tar.gz
sharkey-c5a73ab2d4262ad0c3ca2554e76dea80e3ecf40d.tar.bz2
sharkey-c5a73ab2d4262ad0c3ca2554e76dea80e3ecf40d.zip
[API] resolve deprecation error
error detail: DeprecationWarning: Calling an asynchronous function without callback is deprecated.
Diffstat (limited to 'src/api')
-rw-r--r--src/api/endpoints/drive/files/create.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/api/endpoints/drive/files/create.js b/src/api/endpoints/drive/files/create.js
index 5966499c59..c9de93a9c7 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;