-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nguyễn Nhật Long
committed
May 28, 2024
1 parent
9f570a8
commit ff21431
Showing
2 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
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,29 @@ | ||
import {getModuleContainer, module} from 'inversify-sugar'; | ||
import {GetPostsStore} from './presentation/stores/GetPostsStore/GetPostsStore'; | ||
import {FindPostStore} from './presentation/stores/FindPostStore/FindPostStore'; | ||
import {IPostRepositoryToken} from './domain/specifications/IPostRepository'; | ||
import PostRepository from './infrastructure/implementations/PostRepository'; | ||
import FindPostUseCase from './application/useCases/FindPostUseCase'; | ||
import GetPostsUseCase from './application/useCases/GetPostsUseCase'; | ||
|
||
@module({ | ||
providers: [ | ||
{ | ||
provide: IPostRepositoryToken, | ||
useClass: PostRepository, | ||
}, | ||
FindPostUseCase, | ||
GetPostsUseCase, | ||
{ | ||
useClass: GetPostsStore, | ||
scope: 'Transient', | ||
}, | ||
{ | ||
useClass: FindPostStore, | ||
scope: 'Transient', | ||
}, | ||
], | ||
}) | ||
export class PostModule {} | ||
|
||
export const postModuleContainer = getModuleContainer(PostModule); |
File renamed without changes.