-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(api): add dependency injection on organizationLearnerRepository
- Loading branch information
1 parent
496c00c
commit 1a1cdd0
Showing
4 changed files
with
36 additions
and
19 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
api/src/prescription/organization-learner/domain/usecases/get-organization-learner.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
const getOrganizationLearner = async function ({ organizationLearnerId, organizationLearnerRepository }) { | ||
return organizationLearnerRepository.get(organizationLearnerId); | ||
return organizationLearnerRepository.get({ organizationLearnerId }); | ||
}; | ||
|
||
export { getOrganizationLearner }; |
15 changes: 15 additions & 0 deletions
15
api/src/prescription/organization-learner/infrastructure/repositories/index.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import * as attestationsApi from '../../../../profile/application/api/attestations-api.js'; | ||
import { injectDependencies } from '../../../../shared/infrastructure/utils/dependency-injection.js'; | ||
import * as organizationLearnerRepository from './organization-learner-repository.js'; | ||
|
||
const repositoriesWithoutInjectedDependencies = { | ||
organizationLearnerRepository, | ||
}; | ||
|
||
const dependencies = { | ||
attestationsApi, | ||
}; | ||
|
||
const repositories = injectDependencies(repositoriesWithoutInjectedDependencies, dependencies); | ||
|
||
export { repositories }; |
This file contains 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
This file contains 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