airqo-platform / airqo-platform/AirQo-api

Refactor location processing logic in create-event.js

Offen
#3,779 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

As discussed in [PR #3762](https://github.com/airqo-platform/AirQo-api/pull/3762), the location processing logic for handling `cohort_id` and `grid_id` is duplicated across multiple methods in `src/device-registry/controllers/create-event.js`. Extracting this logic into a shared utility function would improve code maintainability and reduce redundancy.

This issue was requested by @Baalmart in [this comment](https://github.com/airqo-platform/AirQo-api/pull/3762#discussion_r1816465509).

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

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