From 1084ea71ec9641a514ea06e03471733eb971c1fa Mon Sep 17 00:00:00 2001 From: dannylin0711 Date: Fri, 15 Sep 2023 00:46:23 +0800 Subject: [PATCH] Fix mainbg not saving after apply in webui --- sdvx@asphyxia/handlers/webui.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdvx@asphyxia/handlers/webui.ts b/sdvx@asphyxia/handlers/webui.ts index 80f83c1..4c60e8c 100644 --- a/sdvx@asphyxia/handlers/webui.ts +++ b/sdvx@asphyxia/handlers/webui.ts @@ -23,6 +23,7 @@ export const updateProfile = async (data: { stampB_R?: string; stampC_R?: string; stampD_R?: string; + mainbg?: string; appeal_frame?: string; support_team?: string; }) => { @@ -113,6 +114,11 @@ export const updateProfile = async (data: { if (!_.isNaN(validStampD_R)) update.stampD_R = validStampD_R; } + if (data.mainbg && data.mainbg.length > 0) { + const validMainbg = parseInt(data.mainbg); + if (!_.isNaN(validMainbg)) update.mainbg = validMainbg; + } + await DB.Update( data.refid, { collection: 'profile' },