From 3100125380810c0a8f95d7820fb62240802bac55 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Wed, 18 Feb 2026 14:05:45 -0700 Subject: [PATCH] Gug --- index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.js b/index.js index 3ea80d2..4d7fd41 100644 --- a/index.js +++ b/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 => {