airqo-platform / airqo-platform/AirQo-api
Refactor getAirQualityAverages method to remove unnecessary 'next' parameter
Offen
- Vorherrschende Sprache
- JavaScript
- Sterne
- 26
- Forks
- 24
- Ø Merge
- 5 Std. 36 Min.
- Gemergte PRs (30 T.)
- 81
Beschreibung
There's an issue with the static method `getAirQualityAverages` in `eventSchema`. Including the `next` parameter in this method is unconventional for Mongoose models. It's recommended to handle errors by throwing them, allowing the caller to manage error propagation.
Refer to this PR: https://github.com/airqo-platform/AirQo-api/pull/3762
Refer to the comment: https://github.com/airqo-platform/AirQo-api/pull/3762#discussion_r1816358012
Requested by: @Baalmart
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.