Had not declared query const properly. Fixed.
This commit is contained in:
parent
64389ab954
commit
6ee022a2a4
|
@ -31,14 +31,14 @@ class DB {
|
||||||
db.run(query)
|
db.run(query)
|
||||||
}
|
}
|
||||||
find (where, cb) {
|
find (where, cb) {
|
||||||
const query.select()
|
const query = squel.select()
|
||||||
.from(this._table)
|
.from(this._table)
|
||||||
.where(where)
|
.where(where)
|
||||||
.toString()
|
.toString()
|
||||||
db.all(query, cb)
|
db.all(query, cb)
|
||||||
}
|
}
|
||||||
list (cb) {
|
list (cb) {
|
||||||
const query.select()
|
const query = squel.select()
|
||||||
.from(this._table)
|
.from(this._table)
|
||||||
.toString()
|
.toString()
|
||||||
db.all(query, cb)
|
db.all(query, cb)
|
||||||
|
|
Loading…
Reference in New Issue