diff --git a/src/components/CommunityComponents/CommunitySettings.vue b/src/components/CommunityComponents/CommunitySettings.vue index 25bf773bd9c3f4c8c80f92ba28da4352247764ab..eade2eeb081e0f08e491aa6b723e926418de70cb 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 }); }, }, };