diff --git a/src/stores/user.js b/src/stores/user.js index 91278afa..97c8d6fe 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -248,11 +248,10 @@ export const useUserStore = defineStore('user', () => { const fetchUser = async (userType = 'user') => { try { - const userData = await jApi.getObject( - 'SELECT id, nickname, name, lang FROM account.myUser' - ); - if (userType === 'user') mainUser.value = userData; - else supplantedUser.value = userData; + const userData = await api.get('VnUsers/getCurrentUserData'); + + if (userType === 'user') mainUser.value = userData.data; + else supplantedUser.value = userData.data; } catch (error) { console.error('Error fetching user: ', error); }