Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegate work out of services to repositories #20

Closed
tgiardina opened this issue Aug 12, 2020 · 8 comments
Closed

Delegate work out of services to repositories #20

tgiardina opened this issue Aug 12, 2020 · 8 comments
Assignees

Comments

@tgiardina
Copy link
Owner

No description provided.

@kunwar97
Copy link
Contributor

Hi @tgiardina I want to work on this

@tgiardina
Copy link
Owner Author

tgiardina commented Aug 12, 2020

@kunwar97 Excellent, it's all yours! I think TypeOrm will do most of the work for you. The roadmap probably looks something like:

  1. Delete services/user .
  2. Refactor controllers/user to use IUserRepository instead of IUserService.
  3. Refactor loaders/container as appropriate.

Let me know if you have any questions!

@kunwar97
Copy link
Contributor

Sure

@kunwar97
Copy link
Contributor

@tgiardina What about tests in services/user. Should I delete them or move them to another folder?

@tgiardina
Copy link
Owner Author

tgiardina commented Aug 14, 2020

@kunwar97 I think it's fine if you delete them. TypeORM should do everything for you, and there's no need to test that their save and findOne methods are working correctly.

Feel free to get rid of result and all references to it too. I added it as a helper because I was used to Rust, but it's just making the code more complicated at this point.

@kunwar97
Copy link
Contributor

@tgiardina #30

@tgiardina
Copy link
Owner Author

@kunwar97 Thanks! I'll check it out later today!

@tgiardina
Copy link
Owner Author

#30 resolved this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants