aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/app/Controllers
diff options
context:
space:
mode:
authorLibravatar Balaji Vijayakumar <kuttibalaji.v6@gmail.com>2022-12-08 22:28:46 +0530
committerLibravatar GitHub <noreply@github.com>2022-12-08 16:58:46 +0000
commit93d61ced55e7e1c486cdbe6c02c16435ca698860 (patch)
treee4d9e53260e508711cfcf45232d086e906a09d8e /src/internal-server/app/Controllers
parentBackported deprecation fixes from electron v22 upgrade (diff)
downloadferdium-app-93d61ced55e7e1c486cdbe6c02c16435ca698860.tar.gz
ferdium-app-93d61ced55e7e1c486cdbe6c02c16435ca698860.tar.zst
ferdium-app-93d61ced55e7e1c486cdbe6c02c16435ca698860.zip
migrate from gulp to esbuild for faster builds (#815)
Diffstat (limited to 'src/internal-server/app/Controllers')
-rw-r--r--src/internal-server/app/Controllers/Http/ImageController.js3
-rw-r--r--src/internal-server/app/Controllers/Http/UserController.js6
2 files changed, 6 insertions, 3 deletions
diff --git a/src/internal-server/app/Controllers/Http/ImageController.js b/src/internal-server/app/Controllers/Http/ImageController.js
index 731f181e0..5b8337c49 100644
--- a/src/internal-server/app/Controllers/Http/ImageController.js
+++ b/src/internal-server/app/Controllers/Http/ImageController.js
@@ -19,7 +19,8 @@ class ImageController {
19 19
20 try { 20 try {
21 await fs.access(iconPath); 21 await fs.access(iconPath);
22 } catch { 22 } catch (error) {
23 console.log(error);
23 // File not available. 24 // File not available.
24 return response.status(404).send({ 25 return response.status(404).send({
25 status: "Icon doesn't exist", 26 status: "Icon doesn't exist",
diff --git a/src/internal-server/app/Controllers/Http/UserController.js b/src/internal-server/app/Controllers/Http/UserController.js
index fb1a19db6..9a9d76636 100644
--- a/src/internal-server/app/Controllers/Http/UserController.js
+++ b/src/internal-server/app/Controllers/Http/UserController.js
@@ -25,7 +25,8 @@ const apiRequest = (url, route, method, auth) =>
25 }) 25 })
26 .then(data => data.json()) 26 .then(data => data.json())
27 .then(json => resolve(json)); 27 .then(json => resolve(json));
28 } catch { 28 } catch (error) {
29 console.log(error);
29 reject(); 30 reject();
30 } 31 }
31 }); 32 });
@@ -255,7 +256,8 @@ class UserController {
255 let file; 256 let file;
256 try { 257 try {
257 file = JSON.parse(request.input('file')); 258 file = JSON.parse(request.input('file'));
258 } catch { 259 } catch (error) {
260 console.log(error);
259 return response.send( 261 return response.send(
260 'Could not import: Invalid file, could not read file', 262 'Could not import: Invalid file, could not read file',
261 ); 263 );