mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-27 19:53:08 +02:00
[API] Fix bug
This commit is contained in:
parent
56d5a988b6
commit
bcd5f2f83c
1 changed files with 4 additions and 0 deletions
|
@ -22,6 +22,10 @@ import create from '../../../common/add-file-to-drive';
|
|||
module.exports = (file, params, user) =>
|
||||
new Promise(async (res, rej) =>
|
||||
{
|
||||
if (file == null) {
|
||||
return rej('file is required');
|
||||
}
|
||||
|
||||
const buffer = fs.readFileSync(file.path);
|
||||
fs.unlink(file.path, (err) => { if (err) console.log(err) });
|
||||
|
||||
|
|
Loading…
Reference in a new issue