Escaped strings
This commit is contained in:
@@ -369,7 +369,7 @@ app.get("/trigger/api/providers", async (req, res) => {
|
||||
|
||||
app.post("/trigger/api/providers", async (req, res) => {
|
||||
const conn = await pool.getConnection();
|
||||
const query = `INSERT INTO trigger_database.providers (name, url, prefix) VALUES (${escapeString(req.body.name)}, ${req.body.url}, ${req.body.prefix})`;
|
||||
const query = `INSERT INTO trigger_database.providers (name, url, prefix) VALUES (${escapeString(req.body.name)}, ${escapeString(req.body.url)}, ${escapeString(req.body.prefix)})`;
|
||||
conn
|
||||
.query(query)
|
||||
.then((rows) => {
|
||||
|
||||
Reference in New Issue
Block a user