OS2iot / OS2iot-backend

This repository contains the backend to the project OS2iot.
Mozilla Public License 2.0
10 stars 7 forks source link

Fetch latest message instead of all #126

Closed AramAlsabti closed 2 years ago

AramAlsabti commented 2 years ago

When data is retrieved from the database, we get a row per device per package received. Typeorm removes duplicate IoT device rows, thus resulting in less rows on the frontend as expected. This is fixed by joining the table with the latest received metadata' instead of the one with all metadata.

This will fix OS2iot/OS2IoT-frontend#46