From 64f140de76868ac0abda5954685e8ba95853d2dd Mon Sep 17 00:00:00 2001 From: André Oliveira Date: Thu, 28 Sep 2023 13:09:36 +0100 Subject: fix: error isnt catch so stops the code --- app/Controllers/Http/ServiceController.js | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'app/Controllers/Http/ServiceController.js') diff --git a/app/Controllers/Http/ServiceController.js b/app/Controllers/Http/ServiceController.js index 5972cd0..4cc35d3 100644 --- a/app/Controllers/Http/ServiceController.js +++ b/app/Controllers/Http/ServiceController.js @@ -205,12 +205,9 @@ class ServiceController { if (settings.customIcon === 'delete') { fs.remove( path.join(Application.tmpPath('uploads'), settings.iconId), - err => { - if (err) { - return console.error(err); - } - }, - ); + ).catch(error => { + console.error(error); + }); settings.iconId = undefined; settings.customIconVersion = undefined; -- cgit v1.2.3-54-g00ecf