aboutsummaryrefslogtreecommitdiffstats
path: root/src/internal-server/app/Controllers/Http/ServiceController.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal-server/app/Controllers/Http/ServiceController.js')
-rw-r--r--src/internal-server/app/Controllers/Http/ServiceController.js8
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');
2const { validateAll } = use('Validator'); 2const { validateAll } = use('Validator');
3 3
4const { v4: uuid } = require('uuid'); 4const { v4: uuid } = require('uuid');
5const { DEFAULT_SERVICE_ORDER, DEFAULT_SERVICE_SETTINGS } = require('../../../../config'); 5const {
6 DEFAULT_SERVICE_ORDER,
7 DEFAULT_SERVICE_SETTINGS,
8} = require('../../../../config');
6const { convertToJSON } = require('../../../../jsUtils'); 9const { convertToJSON } = require('../../../../jsUtils');
7const { deduceIconUrl, moveIcon } = require('../../ImageHelper'); 10const { 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({