Finish search page
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user