From 49ab44622b369c8f164bf031bbf2db60c99640ae Mon Sep 17 00:00:00 2001 From: "STW_TTTY\\stwtt" Date: Wed, 14 Aug 2024 18:07:01 +0700 Subject: [PATCH] await --- .../detail/PersonalInformation/02_NameChangeHistory.vue | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue index 505d81236..b60f910b6 100644 --- a/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue +++ b/src/modules/04_registryPerson/components/detail/PersonalInformation/02_NameChangeHistory.vue @@ -326,14 +326,12 @@ async function uploadProfile(id: string) { ) .then(async (res) => { uploadUrl.value = res.data["เอกสารหลักฐาน"].uploadUrl; - uploadFileURL(uploadUrl.value, fileUpload.value); + await uploadFileURL(uploadUrl.value, fileUpload.value); }) .catch((err) => { messageError($q, err); - }) - .finally(() => { hideLoader(); - }); + }) } async function uploadFileURL(uploadUrl: string, file: any) { @@ -408,7 +406,7 @@ async function addData() { }) .then(async (res) => { subId.value = await res.data.result; - uploadProfile(res.data.result); + await uploadProfile(res.data.result); fetchData(profileId.value); props?.fetchDataPersonal?.();