diff options
Diffstat (limited to 'app/Controllers/Http/ServiceController.js')
-rw-r--r-- | app/Controllers/Http/ServiceController.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Controllers/Http/ServiceController.js b/app/Controllers/Http/ServiceController.js index 0fcbec0..4c908ac 100644 --- a/app/Controllers/Http/ServiceController.js +++ b/app/Controllers/Http/ServiceController.js | |||
@@ -23,7 +23,7 @@ class ServiceController { | |||
23 | let serviceId; | 23 | let serviceId; |
24 | do { | 24 | do { |
25 | serviceId = uuid(); | 25 | serviceId = uuid(); |
26 | } while((await Service.all()).rows.length > 0) | 26 | } while((await Service.query().where('serviceId', serviceId).fetch()).rows.length > 0) |
27 | 27 | ||
28 | const service = await Service.create({ | 28 | const service = await Service.create({ |
29 | userId: auth.user.id, | 29 | userId: auth.user.id, |