diff --git a/src/regtech_user_fi_management/entities/models/dto.py b/src/regtech_user_fi_management/entities/models/dto.py index 42d102f..830569a 100644 --- a/src/regtech_user_fi_management/entities/models/dto.py +++ b/src/regtech_user_fi_management/entities/models/dto.py @@ -12,15 +12,15 @@ class VersionedData(BaseModel, Generic[T]): data: T -class FinancialInsitutionDomainBase(BaseModel): +class FinancialInstitutionDomainBase(BaseModel): domain: str -class FinancialInsitutionDomainCreate(FinancialInsitutionDomainBase): +class FinancialInstitutionDomainCreate(FinancialInstitutionDomainBase): pass -class FinancialInsitutionDomainDto(FinancialInsitutionDomainBase): +class FinancialInstitutionDomainDto(FinancialInstitutionDomainBase): lei: str class Config: @@ -165,7 +165,7 @@ class FinancialInstitutionWithRelationsDto(FinancialInstitutionDto): sbl_institution_types: List[SblTypeAssociationDetailsDto] = [] hq_address_state: AddressStateDto | None = None lei_status: LeiStatusDto | None = None - domains: List[FinancialInsitutionDomainDto] = [] + domains: List[FinancialInstitutionDomainDto] = [] class FinancialInstitutionAssociationDto(FinancialInstitutionWithRelationsDto): diff --git a/src/regtech_user_fi_management/entities/repos/institutions_repo.py b/src/regtech_user_fi_management/entities/repos/institutions_repo.py index f3888fb..01774cf 100644 --- a/src/regtech_user_fi_management/entities/repos/institutions_repo.py +++ b/src/regtech_user_fi_management/entities/repos/institutions_repo.py @@ -18,7 +18,7 @@ from regtech_user_fi_management.entities.models.dto import ( FinancialInstitutionDto, - FinancialInsitutionDomainCreate, + FinancialInstitutionDomainCreate, SblTypeAssociationDto, ) @@ -92,7 +92,7 @@ def update_sbl_types( def add_domains( - session: Session, lei: str, domains: List[FinancialInsitutionDomainCreate] + session: Session, lei: str, domains: List[FinancialInstitutionDomainCreate] ) -> Set[FinancialInstitutionDomainDao]: daos = set( map( diff --git a/src/regtech_user_fi_management/routers/institutions.py b/src/regtech_user_fi_management/routers/institutions.py index 0b3ee28..285363b 100644 --- a/src/regtech_user_fi_management/routers/institutions.py +++ b/src/regtech_user_fi_management/routers/institutions.py @@ -12,8 +12,8 @@ from regtech_user_fi_management.entities.models.dto import ( FinancialInstitutionDto, FinancialInstitutionWithRelationsDto, - FinancialInsitutionDomainDto, - FinancialInsitutionDomainCreate, + FinancialInstitutionDomainDto, + FinancialInstitutionDomainCreate, FinancialInstitutionAssociationDto, InstitutionTypeDto, AddressStateDto, @@ -163,12 +163,12 @@ def update_types( ) -@router.post("/{lei}/domains/", response_model=List[FinancialInsitutionDomainDto], dependencies=[Depends(check_domain)]) +@router.post("/{lei}/domains/", response_model=List[FinancialInstitutionDomainDto], dependencies=[Depends(check_domain)]) @requires(["query-groups", "manage-users"]) def add_domains( request: Request, lei: str, - domains: List[FinancialInsitutionDomainCreate], + domains: List[FinancialInstitutionDomainCreate], ): return repo.add_domains(request.state.db_session, lei, domains) diff --git a/tests/entities/repos/test_institutions_repo.py b/tests/entities/repos/test_institutions_repo.py index f0636e7..8a248da 100644 --- a/tests/entities/repos/test_institutions_repo.py +++ b/tests/entities/repos/test_institutions_repo.py @@ -4,7 +4,7 @@ from regtech_user_fi_management.entities.models.dto import ( FinancialInstitutionDto, - FinancialInsitutionDomainCreate, + FinancialInstitutionDomainCreate, SblTypeAssociationDto, ) from regtech_user_fi_management.entities.models.dao import ( @@ -331,7 +331,7 @@ def test_add_domains(self, transaction_session: Session, query_session: Session) repo.add_domains( transaction_session, "TESTBANK123000000000", - [FinancialInsitutionDomainCreate(domain="bank.test")], + [FinancialInstitutionDomainCreate(domain="bank.test")], ) transaction_session.expunge_all() fi = repo.get_institution(query_session, "TESTBANK123000000000")