From 5c62002ab47dc19d34b40983a2a1895ce44c056f Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Wed, 17 Sep 2025 18:49:59 +0200 Subject: [PATCH] Fix jwt-token --- server/seedDatabase.js | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/server/seedDatabase.js b/server/seedDatabase.js index b2267a6..31d23cd 100644 --- a/server/seedDatabase.js +++ b/server/seedDatabase.js @@ -91,9 +91,29 @@ async function seedDatabase() { // Create sample devices if none exist const deviceCount = await Device.count(); if (deviceCount === 0) { - // REMOVED: Automatic device creation - // No longer creating sample devices automatically - console.log('📝 No sample devices created - add devices manually through the UI'); + // Create test device for API testing + await Device.create({ + id: '1941875381', + name: 'Test Device 1941875381', + type: 'drone_detector', + location: 'Test Location', + description: 'Test drone detector device for API testing', + is_approved: true, + is_active: true, + tenant_id: defaultTenant.id, + coordinates: JSON.stringify({ + latitude: 0, + longitude: 0 + }), + config: JSON.stringify({ + detection_range: 25000, + alert_threshold: 5000, + frequency_bands: ['2.4GHz', '5.8GHz'], + sensitivity: 'high' + }) + }); + + console.log('✅ Test device 1941875381 created for API testing'); } else { console.log('✅ Devices already exist'); }