diff options
Diffstat (limited to 'src/internal-server/app/Controllers/Http/ServiceController.js')
-rw-r--r-- | src/internal-server/app/Controllers/Http/ServiceController.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/internal-server/app/Controllers/Http/ServiceController.js b/src/internal-server/app/Controllers/Http/ServiceController.js index 44e4a7369..226adb134 100644 --- a/src/internal-server/app/Controllers/Http/ServiceController.js +++ b/src/internal-server/app/Controllers/Http/ServiceController.js | |||
@@ -2,7 +2,10 @@ const Service = use('App/Models/Service'); | |||
2 | const { validateAll } = use('Validator'); | 2 | const { validateAll } = use('Validator'); |
3 | 3 | ||
4 | const { v4: uuid } = require('uuid'); | 4 | const { v4: uuid } = require('uuid'); |
5 | const { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } = require('../../../../config'); | 5 | const { |
6 | DEFAULT_SERVICE_ORDER, | ||
7 | DEFAULT_SERVICE_SETTINGS, | ||
8 | } = require('../../../../config'); | ||
6 | const { convertToJSON } = require('../../../../jsUtils'); | 9 | const { convertToJSON } = require('../../../../jsUtils'); |
7 | const { deduceIconUrl, moveIcon } = require('../../ImageHelper'); | 10 | const { deduceIconUrl, moveIcon } = require('../../ImageHelper'); |
8 | 11 | ||
@@ -30,7 +33,8 @@ class ServiceController { | |||
30 | serviceId = uuid(); | 33 | serviceId = uuid(); |
31 | } while ( | 34 | } while ( |
32 | // eslint-disable-next-line no-await-in-loop, unicorn/no-await-expression-member | 35 | // eslint-disable-next-line no-await-in-loop, unicorn/no-await-expression-member |
33 | (await Service.query().where('serviceId', serviceId).fetch()).rows.length > 0 | 36 | (await Service.query().where('serviceId', serviceId).fetch()).rows |
37 | .length > 0 | ||
34 | ); | 38 | ); |
35 | 39 | ||
36 | await Service.create({ | 40 | await Service.create({ |