Fix jwt-token

This commit is contained in:
2025-09-15 15:21:39 +02:00
parent 995ef9d7c7
commit a7a7e8a58b
2 changed files with 11 additions and 0 deletions

View File

@@ -61,6 +61,9 @@ async function setupTestEnvironment() {
DroneDetection.hasMany(AlertLog, { foreignKey: 'detection_id', as: 'alerts' });
AlertLog.belongsTo(DroneDetection, { foreignKey: 'detection_id', as: 'detection' });
Device.hasMany(AlertLog, { foreignKey: 'device_id', as: 'alerts' });
AlertLog.belongsTo(Device, { foreignKey: 'device_id', as: 'device' });
// Tenant associations
Tenant.hasMany(User, { foreignKey: 'tenant_id', as: 'users' });
User.belongsTo(Tenant, { foreignKey: 'tenant_id', as: 'tenant' });