Skip to content

Migrating old endpoints to v2 API #286

@ZibanPirate

Description

@ZibanPirate

Description

after merging #283 , the old code is still working (old controllers/services), we need to migrate them to the new code and expose the APIs under /v2, bellow are the tasks needed to accomplish this:

Check List

  1. Call /v2/Contributors endpoint from frontend, instead of old endpoint /Contributors, and remove the last.
    • The API code for Contributors Controller get method is here
    • The Frontend code for calling the old endpoint is here and here
  2. Create /v2/GithubUsers endpoint and call it from frontend instead of /github/users, and remove the last.
    • You will create a new method inside Github service similar to listContributors method, but the logic will be that of the old getUser method
    • You will create a new module api/src/github-user and inside you create your controller api/src/github-user/controller.ts similar to Contributors' controller. where you call the newly created method of GithubService.
    • Then update the frontend to call the new endpoint instead of the old one here and here

Additional Comments

please create new PR for each task.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Released

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions