This commit is contained in:
Christopher Cookman 2025-09-29 21:50:37 -06:00
parent 7ba88939b9
commit fc01718a32

View file

@ -619,11 +619,14 @@ app.get("/api/v1/directory/openBlocks", (req, res) => {
1120000, 9110000, 9990000, 1100000, 1170000, 1190000, 1130000, 1910000, 1110000
]
pool.query("SELECT block_start, block_length FROM routes").then((rows) => {
console.log(JSON.stringify(rows)); // for testing
return;
const takenBlocks = rows.map(row => {
return { start: row.block_start, end: row.block_start + row.block_length };
});
const openBlocks = [];
for (let i = 100000; i <= 9999999; i += 10000) {
for (let i = 1000000; i <= 9999999; i += 10000) {
const blockStart = i;
const blockEnd = i + 9999;
// Check if block is invalid