airqo-platform / airqo-platform/AirQo-api

Refactor getAirQualityAverages method to remove unnecessary 'next' parameter

Offen
#3,767 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @Baalmart Auf GitHub ansehen
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

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.