From be0c815fd4df4af5577e4f2b60d356f2791e8feb Mon Sep 17 00:00:00 2001 From: townse41 Date: Wed, 4 Dec 2019 13:15:16 +0000 Subject: [PATCH] fixed images not appearing on questions that started with special characters 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 --- core/models/question.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/models/question.js b/core/models/question.js index c30be6e..993ef8e 100644 --- a/core/models/question.js +++ b/core/models/question.js @@ -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