update: do not assign jwt value to const

This commit is contained in:
Tony Yang
2025-04-15 04:24:51 +08:00
parent 09ff1eb1da
commit 153506c1ca
2 changed files with 4 additions and 7 deletions
+1 -3
View File
@@ -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);