Created
November 8, 2017 14:34
-
-
Save agutoli/4b539974749f8d7634414c0b9b832b68 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const dependencies = { | |
Axios: require('axios'), | |
UserRepository: require('./UserRepository'), | |
OtherUseCase: require('./OtherUseCase'), | |
} | |
async function MyUseCase (someParamId, injection) { | |
const { | |
Axios, | |
UserRepository, | |
OtherUseCase | |
} = Object.assign({}, dependencies, injection) | |
return UserRepository.findby(someParamId) | |
.then(OtherUseCase) | |
} | |
module.exports = MyUseCase |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment