Fixed issues with category routes and worked on post routes

This commit is contained in:
2023-02-02 15:26:47 -05:00
parent 555fc37047
commit 24e2326dc4
11 changed files with 513 additions and 53 deletions

View File

@@ -1,10 +1,12 @@
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
body {
font-family: Arial, Helvetica, sans-serif;
}
</style>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
@@ -46,7 +48,7 @@
</center>
</body>
<script src="./consts.js"></script>
<script src="./consts.js"></script>
<script>
function login() {
@@ -62,11 +64,17 @@
},
body: JSON.stringify({ email: email, password: password })
});
const content = await rawResponse.text();
const content = await rawResponse.json();
console.log(content);
if (content.success) {
setCookie("userId", content.response.userId, 1);
setCookie("sessionId", content.response.sessionId, 1);
window.location.replace("/manage/manageHome.html");
} else {
alert("Incorrect email/password.");
}
})();
}
</script>