diff options
author | 2020-04-02 14:22:55 +0200 | |
---|---|---|
committer | 2020-04-02 14:22:55 +0200 | |
commit | 2ff924e0cc3494489abf0853080f316cc009e18a (patch) | |
tree | a6bb51f77c126f6174a595dda0dbfbfd03b006c8 /app/Controllers/Http/DashboardController.js | |
parent | Add new home page (diff) | |
parent | Merge pull request #22 from getferdi/dependabot/npm_and_yarn/acorn-7.1.1 (diff) | |
download | ferdium-server-2ff924e0cc3494489abf0853080f316cc009e18a.tar.gz ferdium-server-2ff924e0cc3494489abf0853080f316cc009e18a.tar.zst ferdium-server-2ff924e0cc3494489abf0853080f316cc009e18a.zip |
Merge branch 'master' of https://github.com/getferdi/ferdi-server
Diffstat (limited to 'app/Controllers/Http/DashboardController.js')
-rw-r--r-- | app/Controllers/Http/DashboardController.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/app/Controllers/Http/DashboardController.js b/app/Controllers/Http/DashboardController.js index fe179c9..86cfa74 100644 --- a/app/Controllers/Http/DashboardController.js +++ b/app/Controllers/Http/DashboardController.js | |||
@@ -166,7 +166,7 @@ class DashboardController { | |||
166 | session, | 166 | session, |
167 | response, | 167 | response, |
168 | }) { | 168 | }) { |
169 | let validation = await validateAll(request.all(), { | 169 | const validation = await validateAll(request.all(), { |
170 | file: 'required', | 170 | file: 'required', |
171 | }); | 171 | }); |
172 | if (validation.fails()) { | 172 | if (validation.fails()) { |
@@ -177,14 +177,13 @@ class DashboardController { | |||
177 | let file; | 177 | let file; |
178 | try { | 178 | try { |
179 | file = JSON.parse(request.input('file')); | 179 | file = JSON.parse(request.input('file')); |
180 | } catch(e) { | 180 | } catch (e) { |
181 | session.flash({ type: 'danger', message: 'Invalid Ferdi account file' }) | 181 | session.flash({ type: 'danger', message: 'Invalid Ferdi account file' }); |
182 | return response.redirect('back'); | 182 | return response.redirect('back'); |
183 | } | 183 | } |
184 | console.log(file); | ||
185 | 184 | ||
186 | if(!file || !file.services || !file.workspaces) { | 185 | if (!file || !file.services || !file.workspaces) { |
187 | session.flash({ type: 'danger', message: 'Invalid Ferdi account file (2)' }) | 186 | session.flash({ type: 'danger', message: 'Invalid Ferdi account file (2)' }); |
188 | return response.redirect('back'); | 187 | return response.redirect('back'); |
189 | } | 188 | } |
190 | 189 | ||