Error page
This commit is contained in:
@@ -117,6 +117,9 @@ band.get("/band/:name", (req: Request, res: Response) => {
|
||||
|
||||
res.status(200).json(band)
|
||||
})
|
||||
.catch(e => {
|
||||
res.status(404).send()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -110,6 +110,9 @@ concert.get("/concert/:id", (req: Request, res: Response) => {
|
||||
|
||||
res.status(200).json(concert)
|
||||
})
|
||||
.catch(e => {
|
||||
res.status(404).send()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -98,6 +98,9 @@ location.get("/location/:urlName", (req: Request, res: Response) => {
|
||||
|
||||
res.status(200).json(location)
|
||||
})
|
||||
.catch(e => {
|
||||
res.status(404).send()
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,6 @@ order.get("/:id", (req: Request, res: Response) => {
|
||||
|
||||
// Place a new order
|
||||
order.post("/", (req: Request, res: Response) => {
|
||||
console.log(req.body.tickets)
|
||||
Order.create(req.body)
|
||||
.then(async order => {
|
||||
for (let ticket of req.body.tickets) {
|
||||
|
||||
Reference in New Issue
Block a user