Skip to content

Commit

Permalink
fix(comments) : use POST route for delete comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mrflos committed Nov 7, 2023
1 parent 4fcbb0c commit 28e5b78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions javascripts/yeswiki-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ function toastMessage(
e.preventDefault()
const link = $(this)
$.ajax({
type: 'GET',
type: 'POST',
url: link.attr('href'),
dataType: 'json',
success(e) {
Expand Down Expand Up @@ -804,7 +804,7 @@ $('#commentsTableDeleteModal.modal').on('shown.bs.modal',function(event){
let name = $(this).data('name');
let targetNode = $(this).data('targetNode');
let modal = $(this).data('modal');

$.ajax({
method: 'post',
url: wiki.url(`api/comments/${name}/delete`),
Expand Down Expand Up @@ -858,4 +858,4 @@ $('.tab-content [data-toggle="tab"]').on('click',function() {
} else {
$('html, body').animate({ scrollTop: $(base).offset().top - 80 }, 500)
}
})
})

0 comments on commit 28e5b78

Please sign in to comment.