You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
356 B
16 lines
356 B
let axios = require("axios");
|
|
|
|
//even delegation
|
|
$("body").on("click", ".delete-projects", function() {
|
|
let id = $(this).data("id");
|
|
|
|
// axios will send a delete request with this URL
|
|
axios
|
|
.delete("/projects/" + id)
|
|
.then(function() {
|
|
window.location.reload();
|
|
})
|
|
.catch(function(error) {
|
|
console.log(error);
|
|
});
|
|
});
|