Fix incorrect insert statement
All checks were successful
NodBot Production Dockerization / build (pull_request) Successful in 13s

This commit is contained in:
Skylar Grant 2023-08-08 15:06:29 -04:00
parent b28e193b55
commit c562c06925

View File

@ -422,7 +422,7 @@ const functions = {
});
},
async gif(gifData, client) {
const query = `INSERT INTO gifs (name, embed_url) VALUES (${db.escape(gifData.name)}, ${db.escape(gifData.url)}) ON DUPLICATE KEY UPDATE embed_url=${db.escape(gifData.embed_url)}`;
const query = `INSERT INTO gifs (name, embed_url) VALUES (${db.escape(gifData.name)}, ${db.escape(gifData.url)}) ON DUPLICATE KEY UPDATE embed_url=${db.escape(gifData.url)}`;
await db.query(query, (err, rows, fields) => {
if (err) throw err;
functions.download.gifs(client);