Fix the portrait not being up-to-date after login in.
This commit is contained in:
@@ -66,6 +66,10 @@ export const useUserStore = defineStore(
|
||||
try {
|
||||
const userResponse = await client.get("/api/users/profile");
|
||||
user.value = userResponse.data
|
||||
// Cache-busting only if portraitUrl exists
|
||||
if (user.value.portraitUrl) {
|
||||
user.value.portraitUrl = `${user.value.portraitUrl}?${Date.now()}`;
|
||||
}
|
||||
} catch (error) {
|
||||
user.value = undefined;
|
||||
}
|
||||
@@ -189,7 +193,6 @@ export const useUserStore = defineStore(
|
||||
changeEmail,
|
||||
changeAddress,
|
||||
changePortrait,
|
||||
fetchCurrentUserProfile,
|
||||
fetchCurrentCreatorProfile
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user