Skip to content

Conversation

@ZibanPirate
Copy link
Member

@ZibanPirate ZibanPirate commented Apr 4, 2021

Description

API code cleanup branch, resolves #277

This PR introduces dependency injection to api folder, the old api endpoints are still functioning, and the new endpoints are now under /v2 route.

Tasks

  • implement typedi as a DI tool for services (ea3fbc5 & 9bc41c3)
  • Use decorators for controllers, with help of routing-controllers (52d9682 & 55163a8)
  • Add a global error handler
  • Add unit tests, and improve test coverage for new code
  • Add e2e tests
  • Migrate all old endpoints to /v2 and update frontend accordingly Migrating old endpoints to v2 API #286
  • remove unnecessary functionalities
  • add swagger editor and docs (f6d20a8 to 8427b93)
  • Use logger service instead of console (b87ab05 to 65f0c9c)
  • update api/Readme.md to explain code structure inside api folder (44ec2d0)

The unfinished tasks will be converted into issue tickets so everyone can contribute

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

@ZibanPirate ZibanPirate self-assigned this Apr 4, 2021
@github-actions github-actions bot added the api API related changes ( api folder ) label Apr 4, 2021
@ZibanPirate ZibanPirate changed the title Refactoring API folder code Enhancement: Refactoring API folder code Apr 4, 2021
@ZibanPirate ZibanPirate marked this pull request as ready for review April 8, 2021 20:08
@ZibanPirate ZibanPirate requested review from a team and khalilmansouri April 8, 2021 20:08
@ZibanPirate
Copy link
Member Author

@well-balanced this PR will make it a lot easier to contribute to api folder now

@ZibanPirate ZibanPirate requested a review from adamayuda April 8, 2021 20:10
@ZibanPirate ZibanPirate merged commit f54895b into main Apr 9, 2021
@well-balanced
Copy link
Contributor

@ZibanPirate thx :) I'll work on this weekend 😄

@well-balanced
Copy link
Contributor

@ZibanPirate Hi Ziban! I'd like to get some feedback to see if my code is going well. could you check code and questions?

@well-balanced well-balanced mentioned this pull request Apr 10, 2021
2 tasks
@ZibanPirate ZibanPirate deleted the feat/cleaner-api branch December 11, 2021 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API related changes ( api folder )

Projects

Status: Released

Development

Successfully merging this pull request may close these issues.

using dependency injection for API server, for cleaner code

4 participants