diff options
-rw-r--r-- | src/api/server/ServerApi.js | 6 | ||||
-rw-r--r-- | src/stores/ServicesStore.js | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/api/server/ServerApi.js b/src/api/server/ServerApi.js index a684ff98b..d37ff51f8 100644 --- a/src/api/server/ServerApi.js +++ b/src/api/server/ServerApi.js | |||
@@ -173,9 +173,9 @@ export default class ServerApi { | |||
173 | const serviceData = await request.json(); | 173 | const serviceData = await request.json(); |
174 | 174 | ||
175 | if (data.iconFile) { | 175 | if (data.iconFile) { |
176 | const iconUrl = await this.uploadServiceIcon(serviceData.data.id, data.iconFile); | 176 | const iconData = await this.uploadServiceIcon(serviceData.data.id, data.iconFile); |
177 | 177 | ||
178 | serviceData.data.iconUrl = iconUrl; | 178 | serviceData.data = iconData; |
179 | } | 179 | } |
180 | 180 | ||
181 | const service = Object.assign(serviceData, { data: await this._prepareServiceModel(serviceData.data) }); | 181 | const service = Object.assign(serviceData, { data: await this._prepareServiceModel(serviceData.data) }); |
@@ -227,7 +227,7 @@ export default class ServerApi { | |||
227 | 227 | ||
228 | const serviceData = await request.json(); | 228 | const serviceData = await request.json(); |
229 | 229 | ||
230 | return serviceData.data.iconUrl; | 230 | return serviceData.data; |
231 | } | 231 | } |
232 | 232 | ||
233 | async reorderService(data) { | 233 | async reorderService(data) { |
diff --git a/src/stores/ServicesStore.js b/src/stores/ServicesStore.js index 7300a76c8..20e07e540 100644 --- a/src/stores/ServicesStore.js +++ b/src/stores/ServicesStore.js | |||
@@ -187,13 +187,13 @@ export default class ServicesStore extends Store { | |||
187 | 187 | ||
188 | // patch custom icon deletion | 188 | // patch custom icon deletion |
189 | if (data.customIcon === 'delete') { | 189 | if (data.customIcon === 'delete') { |
190 | data.iconUrl = ''; | 190 | newData.iconUrl = ''; |
191 | data.hasCustomUploadedIcon = false; | 191 | newData.hasCustomUploadedIcon = false; |
192 | } | 192 | } |
193 | 193 | ||
194 | // patch custom icon url | 194 | // patch custom icon url |
195 | if (data.customIconUrl) { | 195 | if (data.customIconUrl) { |
196 | data.iconUrl = data.customIconUrl; | 196 | newData.iconUrl = data.customIconUrl; |
197 | } | 197 | } |
198 | 198 | ||
199 | Object.assign(result.find(c => c.id === serviceId), newData); | 199 | Object.assign(result.find(c => c.id === serviceId), newData); |