mirror of
https://github.com/penpot/penpot.git
synced 2025-08-07 14:38:33 +02:00
✨ Add editors count to get-owned-teams rpc method response
This commit is contained in:
parent
f02dd9f8dc
commit
71f5806e23
2 changed files with 8 additions and 4 deletions
|
@ -192,7 +192,8 @@
|
|||
|
||||
(def ^:private sql:get-owned-teams
|
||||
"SELECT t.id, t.name,
|
||||
(SELECT count(*) FROM team_profile_rel WHERE team_id=t.id) AS total_members
|
||||
(SELECT count(*) FROM team_profile_rel WHERE team_id=t.id) AS total_members,
|
||||
(SELECT count(*) FROM team_profile_rel WHERE team_id=t.id AND can_edit=true) AS total_editors
|
||||
FROM team AS t
|
||||
JOIN team_profile_rel AS tpr ON (tpr.team_id = t.id)
|
||||
WHERE t.is_default IS false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue