Manipal-OSF / Manipal-OSF/website

Refactor redundant JSON parsing

Open
#31 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.