Fixed issues with category routes and worked on post routes
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user