diff --git a/index.js b/index.js index 84bd766..2c6bde5 100644 --- a/index.js +++ b/index.js @@ -877,6 +877,7 @@ app.get('/api/v1/route/:apiKey/:ani/:number', (req, res) => { 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 block_start <= ? AND block_start + block_length >= ? AND apiKey = ?;', [number, number, apiKey]).then((rows) => { + console.log(rows) const row = rows[0]; if (row) { // Check if the ANI is within the block range