fixing await & clear code และเก็บ dataProfile ตอน get profile main layout
This commit is contained in:
parent
417a6e5618
commit
1698d86024
3 changed files with 72 additions and 45 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue