developmentseed / developmentseed/osm-teams

Improve validation on API endpoints

Open
#328 0 comments 0 reactions 0 assignees View on GitHub
Category: API Priority: High Type: Enhancement
Dominant language
JavaScript
Stars
29
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Some endpoints are using ad-hoc validation (like in [here](https://github.com/developmentseed/osm-teams/blob/96569b05aa0aea12fef16b505bf542f671bae63e/app/manage/teams.js#L384-L393) and [here](https://github.com/developmentseed/osm-teams/blob/15b0f2ff4b4bb68ea5465d34bf1bec49a1a06761/app/manage/organizations.js#L180-L188)) which is not ideal. We should apply a more robust and consistent validation approach to all endpoints like in [here](https://github.com/developmentseed/osm-teams/blob/15b0f2ff4b4bb68ea5465d34bf1bec49a1a06761/app/manage/badges.js#L263-L274).

cc @kamicut

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the ad-hoc validation in app/manage/teams.js and app/manage/organizations.js with the approach in app/manage/badges.js. Trace the other API endpoints to identify remaining inconsistent validation, then confirm that all endpoints use the same robust approach without changing their intended inputs or behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.