Fix jwt-token
This commit is contained in:
@@ -137,7 +137,7 @@ const setupDatabase = async () => {
|
||||
console.log('🚁 Creating sample drone detections...');
|
||||
const detections = await DroneDetection.bulkCreate([
|
||||
{
|
||||
device_id: 1941875381,
|
||||
device_id: 'device-alpha-001',
|
||||
geo_lat: 59.3293,
|
||||
geo_lon: 18.0686,
|
||||
device_timestamp: Math.floor(Date.now() / 1000),
|
||||
@@ -152,7 +152,7 @@ const setupDatabase = async () => {
|
||||
tenant_id: defaultTenant.id
|
||||
},
|
||||
{
|
||||
device_id: 1941875382,
|
||||
device_id: 'device-beta-002',
|
||||
geo_lat: 57.7089,
|
||||
geo_lon: 11.9746,
|
||||
device_timestamp: Math.floor(Date.now() / 1000) - 3600,
|
||||
@@ -167,7 +167,7 @@ const setupDatabase = async () => {
|
||||
tenant_id: defaultTenant.id
|
||||
},
|
||||
{
|
||||
device_id: 1941875381,
|
||||
device_id: 'device-alpha-001',
|
||||
geo_lat: 59.3295,
|
||||
geo_lon: 18.0690,
|
||||
device_timestamp: Math.floor(Date.now() / 1000) - 7200,
|
||||
@@ -217,7 +217,7 @@ const setupDatabase = async () => {
|
||||
rssi_threshold: -70,
|
||||
max_distance: 1000,
|
||||
drone_types: [1, 2],
|
||||
device_ids: [1941875381, 1941875382]
|
||||
device_ids: ['device-alpha-001', 'device-beta-002']
|
||||
},
|
||||
actions: {
|
||||
sms: true,
|
||||
@@ -234,7 +234,7 @@ const setupDatabase = async () => {
|
||||
description: 'Alert when security devices go offline',
|
||||
conditions: {
|
||||
device_offline: true,
|
||||
device_ids: [1941875381, 1941875382, 1941875383]
|
||||
device_ids: ['device-alpha-001', 'device-beta-002', 'device-gamma-003']
|
||||
},
|
||||
actions: {
|
||||
sms: true,
|
||||
@@ -263,7 +263,7 @@ const setupDatabase = async () => {
|
||||
user_id: operatorUser.id,
|
||||
alert_rule_id: alertRules[1].id,
|
||||
detection_id: null,
|
||||
message: 'Device 1941875383 went offline',
|
||||
message: 'Device device-gamma-003 went offline',
|
||||
status: 'sent',
|
||||
sent_at: new Date(Date.now() - 30 * 60 * 1000)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user