Skip to content
Snippets Groups Projects
Commit 3207eed3 authored by Titus Netland's avatar Titus Netland
Browse files

Merge branch 'delete-community' into 'main'

Delete community

See merge request !142
parents fde08002 8c5813cf
No related branches found
No related tags found
1 merge request!142Delete community
Pipeline #181941 failed
......@@ -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
......@@ -19,9 +19,12 @@ export default {
IconButton,
},
methods: {
deleteCommunity() {
console.log("DELETED");
// 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 });
},
},
};
......
......@@ -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(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment