web/satellite: fix frozen status banners not showing

This change moves the call to fetch user's frozen status into the
getUser store action. It fixes an issue where the froze status banners
will not show.

Change-Id: I1a1853d5a89502e294848ceb6a8566120ecd4c10
This commit is contained in:
Wilfred Asomani 2023-05-19 17:06:28 +00:00
parent b502310fe5
commit 250704493d
3 changed files with 1 additions and 7 deletions

View File

@ -46,15 +46,12 @@ export const useUsersStore = defineStore('users', () => {
const configStore = useConfigStore();
const user = await api.get();
user.freezeStatus = await api.getFrozenStatus();
user.projectLimit ||= configStore.state.config.defaultProjectLimit;
setUser(user);
}
async function getFrozenStatus(): Promise<void> {
state.user.freezeStatus = await api.getFrozenStatus();
}
async function disableUserMFA(request: DisableMFARequest): Promise<void> {
await api.disableUserMFA(request.passcode, request.recoveryCode);
}
@ -112,7 +109,6 @@ export const useUsersStore = defineStore('users', () => {
generateUserMFARecoveryCodes,
clear,
login,
getFrozenStatus,
setUser,
updateSettings,
getSettings,

View File

@ -728,7 +728,6 @@ onMounted(async () => {
try {
await Promise.all([
usersStore.getUser(),
usersStore.getFrozenStatus(),
abTestingStore.fetchValues(),
usersStore.getSettings(),
]);

View File

@ -615,7 +615,6 @@ onMounted(async () => {
try {
await Promise.all([
usersStore.getUser(),
usersStore.getFrozenStatus(),
abTestingStore.fetchValues(),
usersStore.getSettings(),
]);