Fix jwt-token

This commit is contained in:
2025-09-13 15:32:50 +02:00
parent 3a6e98d792
commit cd159239ed
7 changed files with 539 additions and 67 deletions

View File

@@ -49,6 +49,9 @@ AlertLog.belongsTo(DroneDetection, { foreignKey: 'detection_id', as: 'detection'
Tenant.hasMany(User, { foreignKey: 'tenant_id', as: 'users' });
User.belongsTo(Tenant, { foreignKey: 'tenant_id', as: 'tenant' });
Tenant.hasMany(Device, { foreignKey: 'tenant_id', as: 'devices' });
Device.belongsTo(Tenant, { foreignKey: 'tenant_id', as: 'tenant' });
module.exports = {
sequelize,
Device,