Gug
This commit is contained in:
parent
ed75e56d2c
commit
3100125380
2
index.js
2
index.js
|
|
@ -478,7 +478,7 @@ app.get("/api/v1/admin/callLogs", (req, res) => {
|
|||
// Get full count of call logs to calculate total pages
|
||||
pool.getConnection().then(conn => {
|
||||
conn.query("SELECT COUNT(*) as count FROM callLogs").then((rows) => {
|
||||
const totalPages = Math.ceil(rows[0].count / 100);
|
||||
const totalPages = Math.ceil(Number(rows[0].count) / 100);
|
||||
conn.query("SELECT * FROM callLogs ORDER BY timestamp DESC LIMIT 100 OFFSET ?", [offset]).then((rows) => {
|
||||
// Turn all values in rows to strings, prevents type issues with bigints.
|
||||
rows = rows.map(row => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue