summaryrefslogtreecommitdiff
path: root/src/api/endpoints/drive
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-08 14:58:48 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-08 14:58:48 +0900
commit93c0af613f97cd70dddd454150d8174c1dee3577 (patch)
tree1a092b84fc4bb4070ea2dda552f15eba6340c3f8 /src/api/endpoints/drive
parentFix bugs (diff)
downloadsharkey-93c0af613f97cd70dddd454150d8174c1dee3577.tar.gz
sharkey-93c0af613f97cd70dddd454150d8174c1dee3577.tar.bz2
sharkey-93c0af613f97cd70dddd454150d8174c1dee3577.zip
Improve performance
Diffstat (limited to 'src/api/endpoints/drive')
-rw-r--r--src/api/endpoints/drive/files/create.ts1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/api/endpoints/drive/files/create.ts b/src/api/endpoints/drive/files/create.ts
index 43dca7762a..7967c31187 100644
--- a/src/api/endpoints/drive/files/create.ts
+++ b/src/api/endpoints/drive/files/create.ts
@@ -20,6 +20,7 @@ module.exports = (file, params, user) => new Promise(async (res, rej) => {
return rej('file is required');
}
+ // TODO: 非同期にしたい。Promise対応してないんだろうか...
const buffer = fs.readFileSync(file.path);
fs.unlink(file.path, (err) => { if (err) console.log(err); });