airqo-platform / airqo-platform/AirQo-api
Refactor \`listAverages\` method in \`create-event.js\`
Abierto
- Lenguaje dominante
- JavaScript
- Estrellas
- 26
- Forks
- 24
- Merge medio
- 5 h 36 min
- PR fusionados (30 d)
- 81
Descripción
The \`listAverages\` method in \`src/device-registry/utils/create-event.js\` can be refactored to improve error handling and code reuse.
Consider extracting common cache handling logic, defining constants for cache timeouts, and adding input validation for \`site_id\`.
Refer to PR [#3762](https://github.com/airqo-platform/AirQo-api/pull/3762) and [this comment](https://github.com/airqo-platform/AirQo-api/pull/3762#discussion_r1816402973).
Requested by @Baalmart.
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.