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

[API] resolve deprecation error

error detail:
	DeprecationWarning: Calling an asynchronous function without callback is deprecated.
parent 7bc788fc
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
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