Temp
This commit is contained in:
parent
7ba88939b9
commit
fc01718a32
5
index.js
5
index.js
|
@ -619,11 +619,14 @@ app.get("/api/v1/directory/openBlocks", (req, res) => {
|
||||||
1120000, 9110000, 9990000, 1100000, 1170000, 1190000, 1130000, 1910000, 1110000
|
1120000, 9110000, 9990000, 1100000, 1170000, 1190000, 1130000, 1910000, 1110000
|
||||||
]
|
]
|
||||||
pool.query("SELECT block_start, block_length FROM routes").then((rows) => {
|
pool.query("SELECT block_start, block_length FROM routes").then((rows) => {
|
||||||
|
console.log(JSON.stringify(rows)); // for testing
|
||||||
|
|
||||||
|
return;
|
||||||
const takenBlocks = rows.map(row => {
|
const takenBlocks = rows.map(row => {
|
||||||
return { start: row.block_start, end: row.block_start + row.block_length };
|
return { start: row.block_start, end: row.block_start + row.block_length };
|
||||||
});
|
});
|
||||||
const openBlocks = [];
|
const openBlocks = [];
|
||||||
for (let i = 100000; i <= 9999999; i += 10000) {
|
for (let i = 1000000; i <= 9999999; i += 10000) {
|
||||||
const blockStart = i;
|
const blockStart = i;
|
||||||
const blockEnd = i + 9999;
|
const blockEnd = i + 9999;
|
||||||
// Check if block is invalid
|
// Check if block is invalid
|
||||||
|
|
Loading…
Reference in a new issue