database: change db fields

This commit is contained in:
Girish Ramakrishnan
2024-05-31 16:55:21 +02:00
parent 265e58e5cb
commit 0227ae1d96

View File

@@ -26,10 +26,10 @@ let gConnectionPool = null;
const gDatabase = {
hostname: '127.0.0.1',
username: 'root',
user: 'root',
password: 'password',
port: 3306,
name: 'box'
database: 'box'
};
async function initialize() {
@@ -85,7 +85,7 @@ async function query() {
assert.notStrictEqual(gConnectionPool, null);
return new Promise((resolve, reject) => {
let args = Array.prototype.slice.call(arguments);
const 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 }));