summaryrefslogtreecommitdiffstats
path: root/src/internal-server/app/Controllers/Http/ServiceController.js
diff options
context:
space:
mode:
authorLibravatar Ricardo Cino <ricardo@cino.io>2022-06-23 03:22:52 +0200
committerLibravatar GitHub <noreply@github.com>2022-06-23 01:22:52 +0000
commitd24b5f351822e7575a98b84f03bb4ba303f2f40e (patch)
tree7a29ee70733069296221b65524d98df99e3d6863 /src/internal-server/app/Controllers/Http/ServiceController.js
parentMinor dependencies update (diff)
downloadferdium-app-d24b5f351822e7575a98b84f03bb4ba303f2f40e.tar.gz
ferdium-app-d24b5f351822e7575a98b84f03bb4ba303f2f40e.tar.zst
ferdium-app-d24b5f351822e7575a98b84f03bb4ba303f2f40e.zip
fix: dont replace custom icon when service updates (#338)
Diffstat (limited to 'src/internal-server/app/Controllers/Http/ServiceController.js')
-rw-r--r--src/internal-server/app/Controllers/Http/ServiceController.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/internal-server/app/Controllers/Http/ServiceController.js b/src/internal-server/app/Controllers/Http/ServiceController.js
index 89091aa57..44e4a7369 100644
--- a/src/internal-server/app/Controllers/Http/ServiceController.js
+++ b/src/internal-server/app/Controllers/Http/ServiceController.js
@@ -147,6 +147,7 @@ class ServiceController {
147 status: ['updated'], 147 status: ['updated'],
148 }); 148 });
149 } 149 }
150
150 // Update service info 151 // Update service info
151 const data = request.all(); 152 const data = request.all();
152 const { id } = params; 153 const { id } = params;
@@ -155,6 +156,10 @@ class ServiceController {
155 const serviceQuery = await Service.query().where('serviceId', id).fetch(); 156 const serviceQuery = await Service.query().where('serviceId', id).fetch();
156 const serviceData = serviceQuery.rows[0]; 157 const serviceData = serviceQuery.rows[0];
157 158
159 if (data.customIcon === 'delete') {
160 data.iconId = '';
161 }
162
158 const settings = { 163 const settings = {
159 ...convertToJSON(serviceData.settings), 164 ...convertToJSON(serviceData.settings),
160 ...data, 165 ...data,