Escape fix

This commit is contained in:
Sean Edmunds
2025-04-25 14:50:54 -05:00
parent db4318277b
commit b110e102b7
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
/node_modules/ /node_modules/
.env .env
package-lock.json

View File

@@ -356,7 +356,7 @@ app.post("/trigger/api/themePlaylists", async (req, res) => {
app.patch("/trigger/api/themePlaylists", async (req, res) => { app.patch("/trigger/api/themePlaylists", async (req, res) => {
const conn = await pool.getConnection(); 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 conn
.query(query) .query(query)
.then((rows) => { .then((rows) => {