forked from sr2/cloud-api
feat(db): db tuning options and consistency
This commit is contained in:
parent
40918fd8b8
commit
84ba3b6bee
12 changed files with 104 additions and 80 deletions
|
|
@ -33,7 +33,7 @@ from src.exceptions import (
|
|||
from src.contact.models import Contact
|
||||
from src.contact.schemas import ContactAddress
|
||||
from src.contact.exceptions import ContactNotFoundException
|
||||
from src.database import db_dependency
|
||||
from src.database import DbSession
|
||||
from src.organisation.schemas_questionnaires import QuestionnaireQuestionsVersion0
|
||||
from src.organisation.service import assign_defaults
|
||||
from src.user.dependencies import (
|
||||
|
|
@ -98,7 +98,7 @@ router = APIRouter(
|
|||
},
|
||||
)
|
||||
async def get_org_by_id(
|
||||
db: db_dependency, org_model: org_model_root_claim_query_dependency
|
||||
db: DbSession, org_model: org_model_root_claim_query_dependency
|
||||
):
|
||||
"""
|
||||
Returns organisation details including key member email addresses
|
||||
|
|
@ -143,7 +143,7 @@ async def get_org_by_id(
|
|||
},
|
||||
)
|
||||
async def create_org(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
user_model: user_model_claims_dependency,
|
||||
request_model: OrgPostOrgRequest,
|
||||
background_tasks: BackgroundTasks,
|
||||
|
|
@ -217,7 +217,7 @@ async def create_org(
|
|||
},
|
||||
)
|
||||
async def update_questionnaire(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_root_claim_body_dependency,
|
||||
request_model: OrgPatchQuestionnaireRequest,
|
||||
):
|
||||
|
|
@ -281,7 +281,7 @@ async def update_questionnaire(
|
|||
},
|
||||
)
|
||||
async def update_status(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_body_dependency,
|
||||
su: super_admin_dependency,
|
||||
request_model: OrgPatchStatusRequest,
|
||||
|
|
@ -338,7 +338,7 @@ async def get_users(org_model: org_model_root_claim_query_dependency):
|
|||
},
|
||||
)
|
||||
async def add_user_to_org(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_body_dependency,
|
||||
user_model: user_model_body_dependency,
|
||||
su: super_admin_dependency,
|
||||
|
|
@ -380,7 +380,7 @@ async def add_user_to_org(
|
|||
},
|
||||
)
|
||||
async def delete_organisation_by_id(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_query_dependency,
|
||||
su: super_admin_dependency,
|
||||
):
|
||||
|
|
@ -451,7 +451,7 @@ async def delete_organisation_by_id(
|
|||
},
|
||||
)
|
||||
async def delete_preapproved_organisation_by_id(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_root_claim_query_dependency,
|
||||
):
|
||||
"""
|
||||
|
|
@ -479,7 +479,7 @@ async def delete_preapproved_organisation_by_id(
|
|||
},
|
||||
)
|
||||
async def update_root_user(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_body_dependency,
|
||||
user_model: user_model_body_dependency,
|
||||
su: super_admin_dependency,
|
||||
|
|
@ -539,7 +539,7 @@ async def get_org_groups(org_model: org_model_root_claim_query_dependency):
|
|||
},
|
||||
)
|
||||
async def remove_user_from_org(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_root_claim_query_dependency,
|
||||
user_model: user_model_query_dependency,
|
||||
):
|
||||
|
|
@ -610,7 +610,7 @@ async def get_contact(
|
|||
},
|
||||
)
|
||||
async def update_contact(
|
||||
db: db_dependency,
|
||||
db: DbSession,
|
||||
org_model: org_model_root_claim_body_dependency,
|
||||
request_model: OrgPatchContactRequest,
|
||||
):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue