aa
This commit is contained in:
@@ -26,7 +26,10 @@
|
||||
const action = event.target.dataset.action;
|
||||
const id = form.querySelector('input[name="id"]').value;
|
||||
|
||||
fetch(`${window.location}/handle-article-action-pao/${id}/${action}`)
|
||||
let baseUrl = window.location.href;
|
||||
baseUrl = baseUrl.slice(0, baseUrl.lastIndexOf('/'));
|
||||
|
||||
fetch(`${baseUrl}/handle-article-action-pao/${id}/${action}`)
|
||||
.then(response => response.text())
|
||||
.then(data => result.innerHTML = data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user