fixing await & clear code และเก็บ dataProfile ตอน get profile main layout

This commit is contained in:
Warunee Tamkoo 2025-07-31 09:49:22 +07:00
parent 417a6e5618
commit 1698d86024
3 changed files with 72 additions and 45 deletions

View file

@ -481,9 +481,9 @@ async function getProfile() {
if (!store.dataProfile.profileId) {
await http
.get(config.API.profilePosition())
.then(async (res) => {
const data = await res.data.result;
store.dataProfile = await data;
.then((res) => {
const data = res.data.result;
store.dataProfile = data;
})
.catch((e) => {
messageError($q, e);