Open mauvm opened 8 years ago
When the measurements table can't be created (or synched) the MeasurementTableController throws an error. This happens because it listens to the Device created event - https://github.com/kukua/concava-api/blob/master/www/app/Listeners/SynchronizeMeasurementTableListener.php#L19 - which is directly fired after creating the device. But after that the DeviceController links the user to the device: https://github.com/kukua/concava-api/blob/master/www/app/Http/Controllers/DeviceController.php#L21.
MeasurementTableController
Device
DeviceController
Possible solutions:
When the measurements table can't be created (or synched) the
MeasurementTableController
throws an error. This happens because it listens to theDevice
created event - https://github.com/kukua/concava-api/blob/master/www/app/Listeners/SynchronizeMeasurementTableListener.php#L19 - which is directly fired after creating the device. But after that theDeviceController
links the user to the device: https://github.com/kukua/concava-api/blob/master/www/app/Http/Controllers/DeviceController.php#L21.Possible solutions:
MeasurementTableController
methods from theDeviceController
, instead of doing it event driven.