Skip to content

Commit 8755ee7

Browse files
authored
Merge pull request #9 from pixel-Neko/main
fix: commented seats API
2 parents 7f0bfa4 + be293a0 commit 8755ee7

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

index.js

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@ app.use('/form', formRoute);
3939
app.use(`/${process.env.PRIVATE_URL}/subject`, subjectRoute);
4040
app.use('/email', emailRoute);
4141
app.use(`/${process.env.PRIVATE_URL}`, detailsRoute);
42-
43-
app.get('/seats', async(req, res) => {
44-
try {
45-
const seats = await Subject.find({});
46-
return res.status(200).json(seats);
47-
} catch (error) {
48-
return res.status(400).json({ message: "Failed to fetch seats" });
49-
}
50-
})
42+
43+
// GET (seats api), prefer not to make it public
44+
// app.get('/seats', async(req, res) => {
45+
// try {
46+
// const seats = await Subject.find({});
47+
// return res.status(200).json(seats);
48+
// } catch (error) {
49+
// return res.status(400).json({ message: "Failed to fetch seats" });
50+
// }
51+
// })
5152

5253
const PORT = 8089
5354
app.listen(PORT, () => console.log(`Server started on - http://localhost:${PORT}`));

0 commit comments

Comments
 (0)