Exercise 2.5 added

This commit is contained in:
2024-11-20 11:34:44 +01:00
parent 9b04e0ce69
commit cfc466b92e
7 changed files with 34 additions and 41 deletions

View File

@@ -144,16 +144,16 @@ band.get("/search", async (req: Request, res: Response) => {
res.status(200).json(results)
} else {
Band.findAll({
where: {
name: {
[Op.substring]: req.query.value
where: {
name: {
[Op.substring]: req.query.value
},
},
},
include: [ Concert, Genre ]
})
.then(bands => {
res.status(200).json(bands)
include: [ Concert, Genre ]
})
.then(bands => {
res.status(200).json(bands)
})
}
})