Skip to content

Commit

Permalink
added logout after deleting profile
Browse files Browse the repository at this point in the history
  • Loading branch information
BatuevIO committed Oct 19, 2024
1 parent 243606c commit 5bf9ce1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/views/profile/ProfileDeleteView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useToastStore } from '@/store/toast';
import { ToastType } from '@/models';
import { useToolbar } from '@/store/toolbar';
import router from '@/router';

Check failure on line 7 in src/views/profile/ProfileDeleteView.vue

View workflow job for this annotation

GitHub Actions / Проверяем стили

'router' is defined but never used
import { AuthApi } from '@/api';
const toastStore = useToastStore();
const toolbar = useToolbar();
Expand All @@ -26,7 +27,7 @@ async function deleteAccount() {
title: 'Аккаунт успешно удален',
type: ToastType.Info,
});
router.push('/auth');
AuthApi.logout();
} else {
toastStore.push({
title: 'Не удалось удалить аккаунт',
Expand Down

0 comments on commit 5bf9ce1

Please sign in to comment.