Commit 99e55f15e9782ba3a19d5c4b21da0f70db8d6c76

Authored by Adhidarma Hadiwinoto
1 parent da40159fa7
Exists in master

Coba tangani bug mysql

Showing 2 changed files with 1 additions and 2 deletions Side-by-side Diff

... ... @@ -15,7 +15,6 @@ const pool = config.mysql ? mysql.createPool({
15 15 }) : null;
16 16  
17 17 exports.pool = pool;
18   -exports.query = pool.query;
19 18  
20 19 exports.format = (sql, values) => {
21 20 return new Promise((resolve, reject) => {
lib/messages-archive.js
... ... @@ -30,7 +30,7 @@ function insert(params, direction) {
30 30 message: (params.msg || params.message).trim(),
31 31 }];
32 32  
33   - db.query(query, values, (err) => {
  33 + db.pool.query(query, values, (err) => {
34 34 if (err) {
35 35 logger.warn(`MESSAGES-ARCHIVE: DB ERROR on inserting message. ${err.toString()}`);
36 36 }