feat: group ids in get user endpoints
This commit is contained in:
parent
903b24d17d
commit
1aac45eb76
2 changed files with 2 additions and 2 deletions
|
|
@ -42,5 +42,5 @@ class User(Base):
|
|||
def groups(self):
|
||||
result = defaultdict(list)
|
||||
for group in self.group_rel:
|
||||
result[group.org_rel.name].append(group.name)
|
||||
result[group.org_rel.name].append({"name": group.name, "id": group.id})
|
||||
return dict(result)
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class UserResponse(CustomBaseModel):
|
|||
last_name: str
|
||||
email: str
|
||||
organisations: list[Optional[dict[str, str|int]]]
|
||||
groups: Optional[dict[str, list[str]]] = None
|
||||
groups: Optional[dict[str, list[dict[str, str|int]]]] = None
|
||||
|
||||
|
||||
class OrgResponse(CustomBaseModel):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue