feat: get users includes org info

This commit is contained in:
Chris Milne 2026-06-03 09:38:54 +01:00
parent 7833386350
commit 8a9f03ee0b
3 changed files with 13 additions and 4 deletions

View file

@ -185,7 +185,7 @@ async def get_users(org_model: org_model_root_claim_query_dependency):
"""
Returns a list of the email addresses of all users of the organisation.
"""
return {"users": [user.email for user in org_model.user_rel]}
return {"users": [user.email for user in org_model.user_rel], "organisation": org_model}
@router.post("/user",
@ -313,7 +313,7 @@ async def get_contact(org_model: org_model_root_claim_query_dependency, contact_
address = ContactAddress.model_validate(contact_model)
contact_response = ContactModel.model_construct(**contact_model.__dict__, address=address)
return {"contact": contact_response}
return {"contact": contact_response, "organisation": org_model}
@router.patch("/contact",