-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from LerianStudio/feature/asset-module
Refactoring Asset Module
- Loading branch information
Showing
23 changed files
with
139 additions
and
147 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
28 changes: 15 additions & 13 deletions
28
src/app/api/organizations/[id]/ledgers/[ledgerId]/assets/[assetId]/route.ts
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
20 changes: 11 additions & 9 deletions
20
src/app/api/organizations/[id]/ledgers/[ledgerId]/assets/route.ts
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
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
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
4 changes: 2 additions & 2 deletions
4
src/core/domain/repositories/assets/create-asset-repository.ts
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
4 changes: 2 additions & 2 deletions
4
src/core/domain/repositories/assets/delete-asset-repository.ts
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
4 changes: 2 additions & 2 deletions
4
src/core/domain/repositories/assets/fetch-all-assets-repository.ts
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
4 changes: 2 additions & 2 deletions
4
src/core/domain/repositories/assets/fetch-asset-by-id-repository.ts
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
4 changes: 2 additions & 2 deletions
4
src/core/domain/repositories/assets/update-asset-repository.ts
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
107 changes: 0 additions & 107 deletions
107
src/core/infrastructure/container-registry/asset-module.ts
This file was deleted.
Oops, something went wrong.
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
29 changes: 29 additions & 0 deletions
29
src/core/infrastructure/container-registry/use-cases/asset-module.ts
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 { Container, ContainerModule } from '../../utils/di/container' | ||
|
||
import { | ||
CreateAsset, | ||
CreateAssetUseCase | ||
} from '@/core/application/use-cases/assets/create-asset-use-case' | ||
import { | ||
DeleteAsset, | ||
DeleteAssetUseCase | ||
} from '@/core/application/use-cases/assets/delete-asset-use-case' | ||
import { | ||
FetchAllAssets, | ||
FetchAllAssetsUseCase | ||
} from '@/core/application/use-cases/assets/fetch-all-assets-use-case' | ||
import { FetchAssetByIdUseCase } from '@/core/application/use-cases/assets/fetch-asset-by-id-use-case' | ||
import { | ||
UpdateAsset, | ||
UpdateAssetUseCase | ||
} from '@/core/application/use-cases/assets/update-asset-use-case' | ||
|
||
export const AssetUseCaseModule = new ContainerModule( | ||
(container: Container) => { | ||
container.bind<CreateAsset>(CreateAssetUseCase).toSelf() | ||
container.bind<FetchAllAssets>(FetchAllAssetsUseCase).toSelf() | ||
container.bind<FetchAssetByIdUseCase>(FetchAssetByIdUseCase).toSelf() | ||
container.bind<UpdateAsset>(UpdateAssetUseCase).toSelf() | ||
container.bind<DeleteAsset>(DeleteAssetUseCase).toSelf() | ||
} | ||
) |
Oops, something went wrong.