From a37629682c0b493c0319e2447f5ac4c5fb7e0a20 Mon Sep 17 00:00:00 2001 From: ChrisChrome Date: Fri, 27 Dec 2024 21:26:16 -0700 Subject: [PATCH] Fix for Nick --- index.js | 3 ++- views/admin/login.ejs | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 3c9c860..1e9634a 100644 --- a/index.js +++ b/index.js @@ -719,7 +719,8 @@ app.get('/api/v1/route/:apiKey/:ani/:number', (req, res) => { const number = Number(req.params.number); const ani = Number(req.params.ani); pool.getConnection().then(conn => { - conn.query("SELECT * FROM routes WHERE apiKey = ? AND block_start <= ? AND block_start + block_length >= ?", [apiKey, ani, ani]).then((rows) => { + //conn.query("SELECT * FROM routes WHERE apiKey = ? AND block_start <= ? AND block_start + block_length >= ?", [apiKey, ani, ani]).then((rows) => { + conn.query("SELECT * FROM routes WHERE apiKey = ?", [apiKey]).then((rows) => { // We'll try this Nick, if it doesn't work we'll go back to the original const row = rows[0]; // If no row or error, return 401 if (!row) { diff --git a/views/admin/login.ejs b/views/admin/login.ejs index 23522b9..04fabb1 100644 --- a/views/admin/login.ejs +++ b/views/admin/login.ejs @@ -31,7 +31,6 @@ -