Fix jwt-token
This commit is contained in:
@@ -88,10 +88,9 @@ async function seedDatabase() {
|
||||
console.log('✅ Tumanovsky user already exists for uamils-ab tenant');
|
||||
}
|
||||
|
||||
// Create sample devices if none exist
|
||||
const deviceCount = await Device.count();
|
||||
if (deviceCount === 0) {
|
||||
// Create test device for API testing
|
||||
// Create test device for API testing if it doesn't exist
|
||||
const testDevice = await Device.findOne({ where: { id: '1941875381' } });
|
||||
if (!testDevice) {
|
||||
await Device.create({
|
||||
id: '1941875381',
|
||||
name: 'Test Device 1941875381',
|
||||
@@ -115,7 +114,15 @@ async function seedDatabase() {
|
||||
|
||||
console.log('✅ Test device 1941875381 created for API testing');
|
||||
} else {
|
||||
console.log('✅ Devices already exist');
|
||||
console.log('✅ Test device 1941875381 already exists');
|
||||
}
|
||||
|
||||
// Check general device count for info
|
||||
const deviceCount = await Device.count();
|
||||
if (deviceCount === 1) {
|
||||
console.log('📝 Only test device exists - add more devices manually through the UI');
|
||||
} else {
|
||||
console.log(`✅ ${deviceCount} devices exist in total`);
|
||||
}
|
||||
|
||||
// Get admin user for alert rules
|
||||
|
||||
Reference in New Issue
Block a user