From 5c0021372aa1644e65de9b3c7f77063a707cbe12 Mon Sep 17 00:00:00 2001 From: casperiv0 <53900565+casperiv0@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:19:05 +0200 Subject: [PATCH] fix: save URL properly --- .../admin/manage/cad-settings/cad-settings-controller.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/api/src/controllers/admin/manage/cad-settings/cad-settings-controller.ts b/apps/api/src/controllers/admin/manage/cad-settings/cad-settings-controller.ts index b3763fbe2..fced56000 100644 --- a/apps/api/src/controllers/admin/manage/cad-settings/cad-settings-controller.ts +++ b/apps/api/src/controllers/admin/manage/cad-settings/cad-settings-controller.ts @@ -163,8 +163,12 @@ export class CADSettingsController { update: { cadOGDescription: data.cadOGDescription || null, roleplayEnabled: data.roleplayEnabled, - authScreenBgImageId: data.authScreenBgImageId || null, - authScreenHeaderImageId: data.authScreenHeaderImageId || null, + authScreenBgImageId: + data.authScreenBgImageId === null ? null : data.authScreenBgImageId || undefined, + authScreenHeaderImageId: + data.authScreenHeaderImageId === null + ? null + : data.authScreenHeaderImageId || undefined, }, }, },