fix: await API fileByFile

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2026-05-25 13:17:13 +07:00
parent 7d46985570
commit 176b22e756
6 changed files with 38 additions and 21 deletions

View file

@ -323,10 +323,10 @@ async function uploadFileURL(uploadUrl: string, file: any) {
* งกนดงขอมลรปโปรไฟล
* @param id โปรไฟล
*/
async function fetchProfile(id: string) {
await http
function fetchProfile(id: string) {
http
.get(config.API.fileByFile("ทะเบียนประวัติ", "โปรไฟล์", id, fileName.value))
.then(async (res) => {
.then((res) => {
profilePicture.value = res.data.downloadUrl;
})
.catch(() => {
@ -403,7 +403,7 @@ async function fetchDataPersonal() {
fileName.value = res.data.result.avatarName;
if (formDetail.value?.avatarName) {
await fetchProfile(profileId.value);
fetchProfile(profileId.value);
} else {
profilePicture.value = avatar;
}