developmentseed / developmentseed/osm-teams
Improve validation on API endpoints
- 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