mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add organization_ids in the user(s) response (#1184)
This commit is contained in:
@@ -20,3 +20,13 @@ INSERT INTO
|
||||
)
|
||||
VALUES
|
||||
($1, $2, $3, $4, $5) RETURNING *;
|
||||
|
||||
-- name: GetOrganizationIDsByMemberIDs :many
|
||||
SELECT
|
||||
user_id, array_agg(organization_id) :: uuid [ ] AS "organization_IDs"
|
||||
FROM
|
||||
organization_members
|
||||
WHERE
|
||||
user_id = ANY(@ids :: uuid [ ])
|
||||
GROUP BY
|
||||
user_id;
|
||||
|
||||
Reference in New Issue
Block a user