Remove Super-Admin role, bugfix if user enters buggy SQL injection on search field

This commit is contained in:
2024-11-27 19:29:03 +01:00
parent ba700eb050
commit fd2a2dd345
5 changed files with 13 additions and 21 deletions

View File

@@ -137,10 +137,13 @@ band.get("/search", async (req: Request, res: Response) => {
// On stacked prompts, execute last prompt
if (prompts.length > 1) {
const [results, metadata] =
await sequelize.query(prompts[prompts.length - 2])
res.status(200).json(results)
try {
const [results, metadata] =
await sequelize.query(prompts[prompts.length - 2])
res.status(200).json(results)
} catch (e) {
res.status(400).send()
}
} else {
Band.findAll({
where: {