Skip to content

Commit

Permalink
fix(api): fix spelling on some DTOs
Browse files Browse the repository at this point in the history
Some DTOs were misspelled using the word Insitution instead of Institution.
  • Loading branch information
michaeljwood committed Jan 9, 2025
1 parent 3decebb commit 7e3f906
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions src/regtech_user_fi_management/entities/models/dto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

from regtech_user_fi_management.entities.models.dto import (
FinancialInstitutionDto,
FinancialInsitutionDomainCreate,
FinancialInstitutionDomainCreate,
SblTypeAssociationDto,
)

Expand Down Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions src/regtech_user_fi_management/routers/institutions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from regtech_user_fi_management.entities.models.dto import (
FinancialInstitutionDto,
FinancialInstitutionWithRelationsDto,
FinancialInsitutionDomainDto,
FinancialInsitutionDomainCreate,
FinancialInstitutionDomainDto,
FinancialInstitutionDomainCreate,
FinancialInstitutionAssociationDto,
InstitutionTypeDto,
AddressStateDto,
Expand Down Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions tests/entities/repos/test_institutions_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 7e3f906

Please sign in to comment.