Im dumb
This commit is contained in:
parent
ee3ad51468
commit
89ad48bdd9
1
index.js
1
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue