mirror of
https://github.com/hotomoe/hotomoe
synced 2024-12-11 13:18:11 +09:00
[API] resolve deprecation error
error detail: DeprecationWarning: Calling an asynchronous function without callback is deprecated.
This commit is contained in:
parent
7bc788fc57
commit
c5a73ab2d4
@ -23,7 +23,7 @@ module.exports = (file, params, user) =>
|
|||||||
new Promise(async (res, rej) =>
|
new Promise(async (res, rej) =>
|
||||||
{
|
{
|
||||||
const buffer = fs.readFileSync(file.path);
|
const buffer = fs.readFileSync(file.path);
|
||||||
fs.unlink(file.path);
|
fs.unlink(file.path, (err) => { if (err) console.log(err) });
|
||||||
|
|
||||||
// Get 'name' parameter
|
// Get 'name' parameter
|
||||||
let name = file.originalname;
|
let name = file.originalname;
|
||||||
|
Loading…
Reference in New Issue
Block a user