Skip to content
Snippets Groups Projects
Commit aabfe3c8 authored by otofune's avatar otofune
Browse files

format

parent d8a3b4ff
No related branches found
No related tags found
No related merge requests found
......@@ -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}`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment