diff options
Diffstat (limited to 'src/internal-server/app/Controllers/Http')
-rw-r--r-- | src/internal-server/app/Controllers/Http/ImageController.js | 3 | ||||
-rw-r--r-- | src/internal-server/app/Controllers/Http/UserController.js | 6 |
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 | ); |