feat: get org response mirrors get user orgs structure
All checks were successful
ci / lint_and_test (push) Successful in 13s
All checks were successful
ci / lint_and_test (push) Successful in 13s
This commit is contained in:
parent
939abaefe9
commit
3b82025abb
5 changed files with 52 additions and 46 deletions
|
|
@ -92,17 +92,26 @@ async def get_org_by_id(org_model: org_model_root_claim_query_dependency):
|
|||
Returns organisation details including key member email addresses
|
||||
"""
|
||||
response = {
|
||||
"id": org_model.id,
|
||||
"organisation_id": org_model.id,
|
||||
"name": org_model.name,
|
||||
"status": org_model.status,
|
||||
"owner_contact": org_model.owner_contact_rel.email,
|
||||
"billing_contact": org_model.billing_contact_rel.email,
|
||||
"security_contact": org_model.security_contact_rel.email,
|
||||
"root_user": org_model.root_user_email,
|
||||
"intake_questionnaire": org_model.intake_questionnaire,
|
||||
"root_user_email": org_model.root_user_email,
|
||||
"billing_contact": {
|
||||
"id": org_model.billing_contact_id,
|
||||
"email": org_model.billing_contact_rel.email,
|
||||
},
|
||||
"owner_contact": {
|
||||
"id": org_model.owner_contact_id,
|
||||
"email": org_model.owner_contact_rel.email,
|
||||
},
|
||||
"security_contact": {
|
||||
"id": org_model.security_contact_id,
|
||||
"email": org_model.security_contact_rel.email,
|
||||
},
|
||||
}
|
||||
|
||||
return response
|
||||
return {"organisations": [response]}
|
||||
|
||||
|
||||
@router.post(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue