This commit is contained in:
Christopher Cookman 2025-10-03 00:13:11 -06:00
parent ee3ad51468
commit 89ad48bdd9

View file

@ -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