keep working on the like button

This commit is contained in:
2026-07-20 19:02:04 +10:00
parent 7d0727a7aa
commit 6241824960
9 changed files with 67 additions and 4 deletions

15
client/script.js Normal file
View File

@@ -0,0 +1,15 @@
function like(id) {
const usernameBox = document.getElementById('username');
const passwordBox = document.getElementById('password');
const formData = new FormData();
formData.append('username', usernameBox.value);
formData.append('password', passwordBox.value);
formData.append('post', id);
fetch('/like', {
method: 'POST',
body: formData
});
}