feat: add endpoints for orgs
This commit is contained in:
@@ -2,7 +2,12 @@ from fastapi import Depends
|
||||
from src.application.abstractions import IUnitOfWork
|
||||
from src.application.commands import (
|
||||
CreatePurchaseRequestCommand,
|
||||
GetOrganizationCommand,
|
||||
GetOrganizationMnemonicCommand,
|
||||
GetOrganizationSecretKeysCommand,
|
||||
GetPurchaseRequestCommand,
|
||||
ListOrganizationWalletsCommand,
|
||||
ListOrganizationsCommand,
|
||||
ListPurchaseRequestsCommand,
|
||||
)
|
||||
from src.application.contracts import ILogger
|
||||
@@ -29,3 +34,38 @@ def get_get_purchase_request_command(
|
||||
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
|
||||
) -> GetPurchaseRequestCommand:
|
||||
return GetPurchaseRequestCommand(unit_of_work=unit_of_work, logger=logger)
|
||||
|
||||
|
||||
def get_list_organizations_command(
|
||||
logger: ILogger = Depends(get_logger),
|
||||
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
|
||||
) -> ListOrganizationsCommand:
|
||||
return ListOrganizationsCommand(unit_of_work=unit_of_work, logger=logger)
|
||||
|
||||
|
||||
def get_get_organization_command(
|
||||
logger: ILogger = Depends(get_logger),
|
||||
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
|
||||
) -> GetOrganizationCommand:
|
||||
return GetOrganizationCommand(unit_of_work=unit_of_work, logger=logger)
|
||||
|
||||
|
||||
def get_list_organization_wallets_command(
|
||||
logger: ILogger = Depends(get_logger),
|
||||
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
|
||||
) -> ListOrganizationWalletsCommand:
|
||||
return ListOrganizationWalletsCommand(unit_of_work=unit_of_work, logger=logger)
|
||||
|
||||
|
||||
def get_get_organization_mnemonic_command(
|
||||
logger: ILogger = Depends(get_logger),
|
||||
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
|
||||
) -> GetOrganizationMnemonicCommand:
|
||||
return GetOrganizationMnemonicCommand(unit_of_work=unit_of_work, logger=logger)
|
||||
|
||||
|
||||
def get_get_organization_secret_keys_command(
|
||||
logger: ILogger = Depends(get_logger),
|
||||
unit_of_work: IUnitOfWork = Depends(get_unit_of_work),
|
||||
) -> GetOrganizationSecretKeysCommand:
|
||||
return GetOrganizationSecretKeysCommand(unit_of_work=unit_of_work, logger=logger)
|
||||
|
||||
Reference in New Issue
Block a user