Backend for delete post

This commit is contained in:
Marijn Jansen
2017-02-01 14:13:22 +01:00
parent f10d9c14a1
commit d87d0b7295
4 changed files with 90 additions and 1 deletions

View File

@@ -19,4 +19,18 @@ function postComment(buttonValue) {
).done(function (data) {
$('#modal-response').html(fancyText(data));
});
}
function deletePost(postID) {
var formData = [{name: "postID", value: postID}];
$.post(
"API/deletePost.php",
formData
).done(function (response) {
if (response == "frozen") {
alert("Je account is bevroren, dus je kan geen posts verwijderen. Contacteer een admin als je denkt dat dit onjuist is.");
}
});
}