Explorar el Código

fixes #1405

tags/v0.5.1^2
Shaun hace 4 años
padre
commit
dc04af391f
Se han modificado 1 ficheros con 7 adiciones y 0 borrados
  1. +7
    -0
      src/server/db/ioSqlite.js

+ 7
- 0
src/server/db/ioSqlite.js Ver fichero

@@ -207,6 +207,13 @@ module.exports = {
if (options.serialize)
value = JSON.stringify(value);

//Clean single quotes
if (value.split) {
value = value
.split('\'')
.join('`');
}

let exists = await util.promisify(this.db.get.bind(this.db))(`SELECT * FROM ${table} WHERE key = '${key}' LIMIT 1`);

let query = `INSERT INTO ${table} (key, value) VALUES('${key}', '${value}')`;


Cargando…
Cancelar
Guardar