kukua / concava-api

API for modifying ConCaVa metadata.
http://kukua.github.io/concava-api/
MIT License
1 stars 0 forks source link

Device disappears on sync measurement table error #39

Open mauvm opened 8 years ago

mauvm commented 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.

Possible solutions:

  1. Add events in which the controller extending is done (also see #17).
  2. Call the MeasurementTableController methods from the DeviceController, instead of doing it event driven.