Manipal-OSF / Manipal-OSF/website
Refactor redundant JSON parsing
Open
Nobody has claimed this yet.
enhancement
- Dominant language
- TypeScript
- Stars
- 9
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Currently in [api.ts](https://github.com/Manipal-OSF/website/blob/main/frontend/services/api.ts), the logic for parsing JSON is repeated in `fetchOne` and `fetchData`
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in frontend/services/api.ts and compare the JSON parsing logic in fetchOne and fetchData. Refactor the repeated parsing into a shared approach while preserving the existing behavior of both functions; done means the duplication is removed and both data-fetching paths still parse JSON correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100