Question: What is correct way to provide repositories?
bfunc opened this issue · comments
Pavel Litkin commented
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?