commmnt session

This commit is contained in:
Maciej Kotowski committed 2021-10-06 20:55:28 +02:00
1 parent fa62b1c5c4
commit d00a255f61
1 file changed
+2 -2
+2 -2
View File
@@ -107,7 +107,7 @@ app.post("/api/createEvent", (req, res) => {
res.status(200).json(data); res.status(200).json(data);
}); });
}); });
app.post("/api/getSessioniId", (req, res) => { /*app.post("/api/getSessioniId", async (req, res) => {
try { try {
const id = await events.findOne({_id:req.body.id}); const id = await events.findOne({_id:req.body.id});
if (!id) throw Error("something went wrong"); if (!id) throw Error("something went wrong");
@@ -116,7 +116,7 @@ app.post("/api/getSessioniId", (req, res) => {
} catch (err) { } catch (err) {
res.status(400).json({ msg: err }); res.status(400).json({ msg: err });
} }
}); });*/
app.use((req, res, next) => { app.use((req, res, next) => {
res.sendFile(path.join(__dirname + "/client/build/index.html")); res.sendFile(path.join(__dirname + "/client/build/index.html"));