diff --git a/src/database.js b/src/database.js index 6d482a86c..0dc80500c 100644 --- a/src/database.js +++ b/src/database.js @@ -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 }));