summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorotofune <otofune@gmail.com>2017-11-14 05:12:48 +0900
committerotofune <otofune@gmail.com>2017-11-14 05:12:48 +0900
commitaabfe3c87365952bdffa757ea30d8631daf7de4f (patch)
treed61d2074a51a37a7d952bec4c6776668020bf4a4 /src
parentadd-file-to-drive - 責務の分割とテンポラリファイルを削除す... (diff)
downloadsharkey-aabfe3c87365952bdffa757ea30d8631daf7de4f.tar.gz
sharkey-aabfe3c87365952bdffa757ea30d8631daf7de4f.tar.bz2
sharkey-aabfe3c87365952bdffa757ea30d8631daf7de4f.zip
format
Diffstat (limited to 'src')
-rw-r--r--src/api/common/add-file-to-drive.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/api/common/add-file-to-drive.ts b/src/api/common/add-file-to-drive.ts
index 6a728d0d1a..7defbc631a 100644
--- a/src/api/common/add-file-to-drive.ts
+++ b/src/api/common/add-file-to-drive.ts
@@ -213,14 +213,14 @@ export default (user: any, file: string | stream.Readable, ...args) => new Promi
}).then(([path, remove]): Promise<any> => new Promise((res, rej) => {
addFile(user, path, ...args)
.then(file => {
- res(file)
+ res(file);
if (remove) {
fs.unlink(path, (e) => {
- if (e) log(e.stack)
- })
+ if (e) log(e.stack);
+ });
}
})
- .catch(rej)
+ .catch(rej);
}))
.then(file => {
log(`drive file has been created ${file._id}`);