Remove check for duplicate servers.

This commit is contained in:
Christopher Cookman 2024-12-16 14:41:02 -07:00
parent a930aca4d0
commit 742d444d8a

View file

@ -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' });