Revert "database: change db fields"
This reverts commit 0227ae1d96.
unclear why this doesn't work now
This commit is contained in:
+3
-3
@@ -26,10 +26,10 @@ let gConnectionPool = null;
|
|||||||
|
|
||||||
const gDatabase = {
|
const gDatabase = {
|
||||||
hostname: '127.0.0.1',
|
hostname: '127.0.0.1',
|
||||||
user: 'root',
|
username: 'root',
|
||||||
password: 'password',
|
password: 'password',
|
||||||
port: 3306,
|
port: 3306,
|
||||||
database: 'box'
|
name: 'box'
|
||||||
};
|
};
|
||||||
|
|
||||||
async function initialize() {
|
async function initialize() {
|
||||||
@@ -85,7 +85,7 @@ async function query() {
|
|||||||
assert.notStrictEqual(gConnectionPool, null);
|
assert.notStrictEqual(gConnectionPool, null);
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const args = Array.prototype.slice.call(arguments);
|
let args = Array.prototype.slice.call(arguments);
|
||||||
|
|
||||||
args.push(function queryCallback(error, result) {
|
args.push(function queryCallback(error, result) {
|
||||||
if (error) return reject(new BoxError(BoxError.DATABASE_ERROR, error, { code: error.code, sqlMessage: error.sqlMessage || null }));
|
if (error) return reject(new BoxError(BoxError.DATABASE_ERROR, error, { code: error.code, sqlMessage: error.sqlMessage || null }));
|
||||||
|
|||||||
Reference in New Issue
Block a user