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

Question: What is correct way to provide repositories? #77

Open
bfunc opened this issue Apr 24, 2021 · 0 comments
Open

Question: What is correct way to provide repositories? #77

bfunc opened this issue Apr 24, 2021 · 0 comments

Comments

@bfunc
Copy link

bfunc commented Apr 24, 2021

Here
src\interfaces\http\modules\user\instance.js
We have this code:

const container = require('src/container') // we have to get the DI
const { get, post, put, remove } = require('src/app/user')

module.exports = () => {
  const { repository: { userRepository}} = container.cradle

  const postUseCase = post({ userRepository, ??? })

Question, if in my case to store User there is need to update several repositiries, I should add it here, but why? Is this responsibility of external Interface to know what repositories are needed to store entity?

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

1 participant