Skip to content

Commit ab3d254

Browse files
committed
query
1 parent 7d60186 commit ab3d254

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

coderd/database/modelqueries.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ func (q *sqlQuerier) GetAuthorizedUsers(ctx context.Context, arg GetUsersParams,
393393
arg.LastSeenAfter,
394394
arg.CreatedBefore,
395395
arg.CreatedAfter,
396+
arg.GithubComUserID,
396397
arg.OffsetOpt,
397398
arg.LimitOpt,
398399
)

coderd/database/queries/users.sql

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,11 @@ WHERE
223223
created_at >= @created_after
224224
ELSE true
225225
END
226+
AND CASE
227+
WHEN @github_com_user_id :: bigint != 0 THEN
228+
github_com_user_id = @github_com_user_id
229+
ELSE true
230+
END
226231
-- End of filters
227232

228233
-- Authorize Filter clause will be injected below in GetAuthorizedUsers

0 commit comments

Comments
 (0)