From ec4ab6b3fe0c065023b4a31fc70fb9d88874980c Mon Sep 17 00:00:00 2001
From: Erik Borgeteien Hansen <erik@erikbhan.no>
Date: Fri, 6 May 2022 08:40:41 +0200
Subject: [PATCH] fix delete community

---
 src/components/CommunityComponents/CommunitySettings.vue | 5 ++---
 src/services/community-admin.service.js                  | 2 +-
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/components/CommunityComponents/CommunitySettings.vue b/src/components/CommunityComponents/CommunitySettings.vue
index 8ea68e5..25bf773 100644
--- a/src/components/CommunityComponents/CommunitySettings.vue
+++ b/src/components/CommunityComponents/CommunitySettings.vue
@@ -9,7 +9,7 @@
 </template>
 
 <script>
-// import CommunityAdminService from "@/services/community-admin.service";
+import CommunityAdminService from "@/services/community-admin.service";
 import IconButton from "@/components/BaseComponents/IconButton.vue";
 
 //TODO: OPEN CONFIRMATION DIALOG WHEN DELETING
@@ -20,8 +20,7 @@ export default {
   },
   methods: {
     deleteCommunity() {
-      console.log("DELETED");
-      // CommunityAdminService.deleteCommunity(this.$route.params.communityID);
+      CommunityAdminService.deleteCommunity(this.$route.params.communityID);
     },
   },
 };
diff --git a/src/services/community-admin.service.js b/src/services/community-admin.service.js
index c935f11..eb2c23e 100644
--- a/src/services/community-admin.service.js
+++ b/src/services/community-admin.service.js
@@ -60,7 +60,7 @@ class CommunityAdminService {
    * @returns TODO
    */
   async deleteCommunity(communityID) {
-    return await axios.post(
+    return await axios.delete(
       API_URL + "communities/" + communityID + "/remove",
       {
         headers: tokenHeader(),
-- 
GitLab