Browse Source

Changed config to use property "database" instead of "db" to match the mysql plugin. "database" gets mapped to "db" for the mariasql dependency. Updated package version to match.

master
Michael Bryant 4 years ago
parent
commit
ae505e2910
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      mariadb.js
  2. +1
    -1
      package.json

+ 2
- 2
mariadb.js View File

@ -116,7 +116,7 @@ function ConfigDB(obj){
if (this instanceof ConfigDB){
var that = this;
if (!(obj.hasOwnProperty("host") && obj.hasOwnProperty("user") && obj.hasOwnProperty("password") &&
obj.hasOwnProperty("db"))) {
obj.hasOwnProperty("database"))) {
throw new Error("Missing one or more of the required options: host, user, password, db")
}
@ -125,7 +125,7 @@ function ConfigDB(obj){
that.host = obj.host;
that.user = obj.user;
that.password = obj.password;
that.db = obj.db;
that.db = obj.db = obj.database;
// This gets set in load()
that.queues = {};


+ 1
- 1
package.json View File

@ -23,7 +23,7 @@
},
"homepage":
"https://github.com/Shadow53/student-queue-mariadb-plugin#readme",
"version": "0.1.11",
"version": "0.1.12",
"main": "mariadb.js",
"devDependencies": {},
"scripts": {