Revert "database: change db fields"

This reverts commit 0227ae1d96.

unclear why this doesn't work now
This commit is contained in:
Girish Ramakrishnan
2024-06-03 10:35:50 +02:00
parent 449d68122b
commit d12b2ae2db

View File

@@ -26,10 +26,10 @@ let gConnectionPool = null;
const gDatabase = {
hostname: '127.0.0.1',
user: 'root',
username: 'root',
password: 'password',
port: 3306,
database: 'box'
name: 'box'
};
async function initialize() {
@@ -85,7 +85,7 @@ async function query() {
assert.notStrictEqual(gConnectionPool, null);
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) {
if (error) return reject(new BoxError(BoxError.DATABASE_ERROR, error, { code: error.code, sqlMessage: error.sqlMessage || null }));