Escape fix
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,2 +1,3 @@
|
||||
/node_modules/
|
||||
.env
|
||||
package-lock.json
|
||||
@@ -356,7 +356,7 @@ app.post("/trigger/api/themePlaylists", async (req, res) => {
|
||||
|
||||
app.patch("/trigger/api/themePlaylists", async (req, res) => {
|
||||
const conn = await pool.getConnection();
|
||||
const query = `UPDATE trigger_database.themePlaylists SET name = ${escapeString(req.body.name)}, themeList = ${req.body.themeList} WHERE id = ${req.body.id};`;
|
||||
const query = `UPDATE trigger_database.themePlaylists SET name = ${escapeString(req.body.name)}, themeList = ${escapeString(req.body.themeList)} WHERE id = ${req.body.id};`;
|
||||
conn
|
||||
.query(query)
|
||||
.then((rows) => {
|
||||
|
||||
Reference in New Issue
Block a user