view specific posts

This commit is contained in:
2026-07-20 20:11:06 +10:00
parent 94b5365a1c
commit eff5313f26
5 changed files with 52 additions and 6 deletions

11
client/e404.html Normal file
View File

@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>404</title>
<link rel="stylesheet" type="text/css" href="/style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>404 lmao</h1>
</body>
</html>

View File

@@ -1,5 +1,4 @@
function like(id) {
async function like(id) {
const usernameBox = document.getElementById('username');
const passwordBox = document.getElementById('password');
@@ -8,8 +7,12 @@ function like(id) {
formData.append('password', passwordBox.value);
formData.append('post', id);
fetch('/like', {
method: 'POST',
body: formData
const result = await fetch('/like', {
method: 'POST',
body: formData
});
if (result.status < 200 || result.status >= 400) {
alert("your post didnt get the like because the server thought your opinion was invalid");
}
}