Finish search page

This commit is contained in:
2024-10-11 18:59:19 +02:00
parent 8f0de99634
commit 7b991d2ff8
8 changed files with 227 additions and 54 deletions

View File

@@ -118,8 +118,19 @@ band.get("/search", (req: Request, res: Response) => {
where: {
name: {
[Op.substring]: req.query.value
},
},
include: [
{
model: Event,
include: [
Concert
]
},
{
model: Genre
}
}
]
})
.then(bands => {
res.status(200).json(bands)

View File

@@ -116,7 +116,8 @@ location.get("/search", (req: Request, res: Response) => {
name: {
[Op.substring]: req.query.value
}
}
},
include: [ Concert ]
})
.then(locations => {
res.status(200).json(locations)