Skip to content
Permalink
Browse files
fixed images not appearing on questions that started with special cha…
…racters

Adding a ' to the first word of the question would not allow questions to show

Changed the single quotes to double quotes in the sql command
  • Loading branch information
townse41 committed Dec 4, 2019
1 parent 456c781 commit be0c815fd4df4af5577e4f2b60d356f2791e8feb
Showing 1 changed file with 1 addition and 1 deletion.
@@ -141,7 +141,7 @@ module.exports = class Question {
try{
await fs.copy(data.path, data.paths.filePath)
await fs.copy(data.path, data.paths.thumbPath)
const sql = `UPDATE questions SET image = '${data.imageName}' WHERE id = ${data.QuestionId}`
const sql = `UPDATE questions SET image = "${data.imageName}" WHERE id = ${data.QuestionId}`
await this.db.run(sql)
} catch(err) {
throw err

0 comments on commit be0c815

Please sign in to comment.