Remove EventModel in frontend

This commit is contained in:
2024-10-12 21:00:42 +02:00
parent 6c33de3d87
commit c8d87f6643
33 changed files with 313 additions and 377 deletions

View File

@@ -12,6 +12,8 @@ export const concert = Router()
concert.get("/", (req: Request, res: Response) => {
let count = req.query.count
Concert.findAll({
include: [ Band, Location ],
order: [
@@ -19,6 +21,11 @@ concert.get("/", (req: Request, res: Response) => {
]
})
.then(concerts => {
// Limit number of items
if (count != undefined) {
concerts.splice(Number(count))
}
res.status(200).json(concerts)
})
})