aboutsummaryrefslogtreecommitdiffstats
path: root/app/Controllers/Http/ServiceController.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/Controllers/Http/ServiceController.js')
-rw-r--r--app/Controllers/Http/ServiceController.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Controllers/Http/ServiceController.js b/app/Controllers/Http/ServiceController.js
index 1dfec49..7162268 100644
--- a/app/Controllers/Http/ServiceController.js
+++ b/app/Controllers/Http/ServiceController.js
@@ -93,7 +93,7 @@ class ServiceController {
93 spellcheckerLanguage: '', 93 spellcheckerLanguage: '',
94 workspaces: [], 94 workspaces: [],
95 iconUrl: null, 95 iconUrl: null,
96 ...JSON.parse(service.settings), 96 ...typeof service.settings === "string" ? JSON.parse(service.settings) : service.settings,
97 id: service.serviceId, 97 id: service.serviceId,
98 name: service.name, 98 name: service.name,
99 recipeId: service.recipeId, 99 recipeId: service.recipeId,
@@ -138,7 +138,7 @@ class ServiceController {
138 .where('userId', auth.user.id).fetch()).rows[0]; 138 .where('userId', auth.user.id).fetch()).rows[0];
139 139
140 const settings = { 140 const settings = {
141 ...JSON.parse(serviceData.settings), 141 ...typeof serviceData.settings === "string" ? JSON.parse(serviceData.settings) : serviceData.settings,
142 ...data, 142 ...data,
143 }; 143 };
144 144
@@ -177,7 +177,7 @@ class ServiceController {
177 .where('userId', auth.user.id).fetch()).rows[0]; 177 .where('userId', auth.user.id).fetch()).rows[0];
178 178
179 const settings = { 179 const settings = {
180 ...JSON.parse(serviceData.settings), 180 ...typeof serviceData.settings === "string" ? JSON.parse(serviceData.settings) : serviceData.settings,
181 order: data[service], 181 order: data[service],
182 }; 182 };
183 183
@@ -205,7 +205,7 @@ class ServiceController {
205 spellcheckerLanguage: '', 205 spellcheckerLanguage: '',
206 workspaces: [], 206 workspaces: [],
207 iconUrl: null, 207 iconUrl: null,
208 ...JSON.parse(service.settings), 208 ...typeof service.settings === "string" ? JSON.parse(service.settings) : service.settings,
209 id: service.serviceId, 209 id: service.serviceId,
210 name: service.name, 210 name: service.name,
211 recipeId: service.recipeId, 211 recipeId: service.recipeId,