From b110e102b71f05d64cd3d51148b310e1fe602e29 Mon Sep 17 00:00:00 2001 From: Sean Edmunds Date: Fri, 25 Apr 2025 14:50:54 -0500 Subject: [PATCH] Escape fix --- .gitignore | 1 + server.cjs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f0fc62a..ed59f75 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /node_modules/ .env +package-lock.json \ No newline at end of file diff --git a/server.cjs b/server.cjs index 6dfb2ca..9ad97a5 100644 --- a/server.cjs +++ b/server.cjs @@ -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) => {