Fix jwt-token

This commit is contained in:
2025-09-15 15:20:58 +02:00
parent 6ffe1156ca
commit 995ef9d7c7
2 changed files with 11 additions and 0 deletions

View File

@@ -68,6 +68,9 @@ async function setupTestEnvironment() {
Tenant.hasMany(Device, { foreignKey: 'tenant_id', as: 'devices' });
Device.belongsTo(Tenant, { foreignKey: 'tenant_id', as: 'tenant' });
Tenant.hasMany(AlertRule, { foreignKey: 'tenant_id', as: 'alertRules' });
AlertRule.belongsTo(Tenant, { foreignKey: 'tenant_id', as: 'tenant' });
// Create models object
models = {
sequelize,