Streamlined stores

This commit is contained in:
2024-10-22 18:47:27 +02:00
parent 3e53a606a6
commit 4e6be355ea
45 changed files with 384 additions and 387 deletions

View File

@@ -93,13 +93,23 @@ location.get("/location/:urlName", (req: Request, res: Response) => {
location.get("/search", (req: Request, res: Response) => {
Location.findAll({
where: {
name: {
[Op.substring]: req.query.value
}
[Op.or]: [
{
name: {
[Op.substring]: req.query.value
},
},
{
"$city.name$": {
[Op.substring]: req.query.value
}
}
]
},
include: [ Concert ]
include: [ City, Concert ]
})
.then(locations => {
console.log(locations)
res.status(200).json(locations)
})
})