New page for all concerts

This commit is contained in:
2024-10-12 19:40:12 +02:00
parent f8bdb54c33
commit 6c33de3d87
56 changed files with 531 additions and 405 deletions

View File

@@ -20,15 +20,6 @@ location.get("/", (req: Request, res: Response) => {
{
model: Concert,
include: [ Band ],
},
{
model: SeatGroup,
include: [
{
model: SeatRow,
include: [ Seat ]
}
]
}
],
attributes: {
@@ -46,6 +37,12 @@ location.get("/", (req: Request, res: Response) => {
})
}
for (let location of locations) {
location.dataValues["nrOfConcerts"] = location.dataValues.concerts.length
delete location.dataValues.concerts
}
// Limit number of items
if (count != undefined) {
locations.splice(Number(count))
}
@@ -86,7 +83,6 @@ location.get("/location/:urlName", (req: Request, res: Response) => {
}
}
res.status(200).json(location)
})
})