From 488fdf85d5ed8d4a4c30a7e7eb77d10b6e70c894 Mon Sep 17 00:00:00 2001 From: Erik Borgeteien Hansen <erik@erikbhan.no> Date: Fri, 6 May 2022 09:47:52 +0200 Subject: [PATCH] add routing after delete --- src/components/CommunityComponents/CommunitySettings.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/CommunityComponents/CommunitySettings.vue b/src/components/CommunityComponents/CommunitySettings.vue index 25bf773..eade2ee 100644 --- a/src/components/CommunityComponents/CommunitySettings.vue +++ b/src/components/CommunityComponents/CommunitySettings.vue @@ -19,8 +19,12 @@ export default { IconButton, }, methods: { - deleteCommunity() { - CommunityAdminService.deleteCommunity(this.$route.params.communityID); + async deleteCommunity() { + let response = await CommunityAdminService.deleteCommunity( + this.$route.params.communityID + ); + if (response.status === 200) + this.$router.push({ name: "home", replace: true }); }, }, }; -- GitLab