This commit is contained in:
2021-02-08 15:48:33 +01:00
parent 1434918f8e
commit 9dd4d10396
5 changed files with 42 additions and 16 deletions

View File

@@ -28,7 +28,7 @@ var router = express.Router();
router.post("/login", async (req, res) => {
try {
if (!req.body.password || !req.body.email) {
throw newError("Niepełne dane.", 204);
throw newError("Niepełne dane.", 403);
}
validateLogin(req.body);
const user = await fetchUser(req.body.email);
@@ -87,6 +87,15 @@ router.post("/register", async (req, res) => {
}
});
// CHANGE USER DATA
router.post("/edit", async (req, res) => {
try {
console.log("23")
} catch (error) {
handleError(error, res)
}
})
// CHANGE PASSWORD
router.post("/changepass", async (req, res) => {
try {