Fix jwt-token
This commit is contained in:
@@ -503,14 +503,6 @@ module.exports = {
|
|||||||
type: Sequelize.TEXT,
|
type: Sequelize.TEXT,
|
||||||
allowNull: true
|
allowNull: true
|
||||||
},
|
},
|
||||||
conditions: {
|
|
||||||
type: Sequelize.JSON,
|
|
||||||
allowNull: false
|
|
||||||
},
|
|
||||||
actions: {
|
|
||||||
type: Sequelize.JSON,
|
|
||||||
allowNull: false
|
|
||||||
},
|
|
||||||
device_ids: {
|
device_ids: {
|
||||||
type: Sequelize.JSON,
|
type: Sequelize.JSON,
|
||||||
allowNull: true,
|
allowNull: true,
|
||||||
|
|||||||
@@ -202,6 +202,17 @@ const setupDatabase = async () => {
|
|||||||
tenant_id: defaultTenant.id,
|
tenant_id: defaultTenant.id,
|
||||||
name: 'Critical Security Threat',
|
name: 'Critical Security Threat',
|
||||||
description: 'Immediate alert for critical and high threats to government facilities',
|
description: 'Immediate alert for critical and high threats to government facilities',
|
||||||
|
conditions: {
|
||||||
|
min_rssi: -55,
|
||||||
|
drone_types: [0, 1, 2],
|
||||||
|
time_window: 300,
|
||||||
|
min_detections: 1
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
alert_channels: ['sms', 'email'],
|
||||||
|
sms_phone_number: '+46701234567',
|
||||||
|
priority: 'high'
|
||||||
|
},
|
||||||
is_active: true,
|
is_active: true,
|
||||||
device_ids: [],
|
device_ids: [],
|
||||||
drone_types: [0, 1, 2],
|
drone_types: [0, 1, 2],
|
||||||
@@ -224,6 +235,7 @@ const setupDatabase = async () => {
|
|||||||
tenant_id: defaultTenant.id,
|
tenant_id: defaultTenant.id,
|
||||||
name: 'Medium Threat Monitoring',
|
name: 'Medium Threat Monitoring',
|
||||||
description: 'Monitor medium threat drones in facility vicinity',
|
description: 'Monitor medium threat drones in facility vicinity',
|
||||||
|
|
||||||
is_active: true,
|
is_active: true,
|
||||||
device_ids: ['device-alpha-001', 'device-beta-002'],
|
device_ids: ['device-alpha-001', 'device-beta-002'],
|
||||||
drone_types: [1, 2],
|
drone_types: [1, 2],
|
||||||
@@ -246,6 +258,16 @@ const setupDatabase = async () => {
|
|||||||
tenant_id: defaultTenant.id,
|
tenant_id: defaultTenant.id,
|
||||||
name: 'Device Offline Alert',
|
name: 'Device Offline Alert',
|
||||||
description: 'Alert when security devices go offline',
|
description: 'Alert when security devices go offline',
|
||||||
|
conditions: {
|
||||||
|
device_ids: ['device-alpha-001', 'device-beta-002', 'device-gamma-003'],
|
||||||
|
time_window: 300,
|
||||||
|
min_detections: 1
|
||||||
|
},
|
||||||
|
actions: {
|
||||||
|
alert_channels: ['sms'],
|
||||||
|
sms_phone_number: '+46701234567',
|
||||||
|
priority: 'medium'
|
||||||
|
},
|
||||||
is_active: true,
|
is_active: true,
|
||||||
device_ids: ['device-alpha-001', 'device-beta-002', 'device-gamma-003'],
|
device_ids: ['device-alpha-001', 'device-beta-002', 'device-gamma-003'],
|
||||||
drone_types: null,
|
drone_types: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user