update: do not assign jwt value to const
This commit is contained in:
@@ -14,8 +14,6 @@ const props = defineProps({
|
||||
const authStore = useAuthStore();
|
||||
const router = useRouter();
|
||||
|
||||
const jwt = authStore.jwt;
|
||||
|
||||
const avatarFile = ref(null);
|
||||
const avatarError = ref('');
|
||||
|
||||
@@ -42,7 +40,7 @@ const onSubmit = async () => {
|
||||
}
|
||||
|
||||
try {
|
||||
await uploadAvatar(avatarFile.value, jwt);
|
||||
await uploadAvatar(avatarFile.value, authStore.jwt);
|
||||
alert('Avatar uploaded successfully!');
|
||||
// After successful upload, reload this page
|
||||
router.go(0);
|
||||
|
||||
Reference in New Issue
Block a user