Remove check for duplicate servers.
This commit is contained in:
parent
a930aca4d0
commit
742d444d8a
2
index.js
2
index.js
|
@ -259,7 +259,7 @@ app.post('/api/v1/admin/route', (req, res) => { // Create a new route
|
|||
return;
|
||||
}
|
||||
// Check if route already exists (OR conditions on server, and block range)
|
||||
db.get('SELECT * FROM routes WHERE server = ? OR block_start <= ? AND block_start + block_length >= ?', [server, block_start, block_start], (err, row) => {
|
||||
db.get('SELECT * FROM routes WHERE block_start <= ? AND block_start + block_length >= ?', [block_start, block_start], (err, row) => {
|
||||
if (err) {
|
||||
console.error('Error checking for existing route:', err);
|
||||
res.status(500).json({ error: 'Internal server error' });
|
||||
|
|
Loading…
Reference in a new issue