Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f99ca55c2 |
@@ -826,8 +826,6 @@ export default function () {
|
|||||||
res
|
res
|
||||||
.status(500)
|
.status(500)
|
||||||
.json({ message: 'Database error fetching manager permissions.', details: error.message })
|
.json({ message: 'Database error fetching manager permissions.', details: error.message })
|
||||||
} finally {
|
|
||||||
db.release()
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -13,8 +13,8 @@ const db = mysql.createPool({
|
|||||||
database: process.env.DB_NAME,
|
database: process.env.DB_NAME,
|
||||||
port: process.env.DB_PORT,
|
port: process.env.DB_PORT,
|
||||||
waitForConnections: true,
|
waitForConnections: true,
|
||||||
connectionLimit: 50,
|
connectionLimit: 10,
|
||||||
queueLimit: 100,
|
queueLimit: 0,
|
||||||
// timezone: '+08:00',
|
// timezone: '+08:00',
|
||||||
dateStrings: true,
|
dateStrings: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,22 +0,0 @@
|
|||||||
import { getConnection } from './pool.js'
|
|
||||||
// import mysql from 'mysql2/promise'
|
|
||||||
//
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// export const db = mysql.createPool({
|
|
||||||
// host: '47.254.195.2',
|
|
||||||
// user: 'nilai_clock_indo',
|
|
||||||
// password: '5jHy8ZsfeEjPAhYS',
|
|
||||||
// database: 'nilai_clock_indo',
|
|
||||||
// port: 3306,
|
|
||||||
// waitForConnections: true,
|
|
||||||
// connectionLimit: 10,
|
|
||||||
// queueLimit: 0,
|
|
||||||
// dateStrings: true,
|
|
||||||
// // 不在这里设置timezone,因为我们用查询设置
|
|
||||||
// });
|
|
||||||
|
|
||||||
const conn = await getConnection()
|
|
||||||
|
|
||||||
const [rows] = await conn.execute('select * from clock_records where id= 6654');
|
|
||||||
console.log(rows);
|
|
||||||
Reference in New Issue
Block a user