feat: support created_at filter for the GET /users endpoint (#15633)

Closes https://github.com/coder/coder/issues/12747

We support these filters currently:
https://coder.com/docs/v2/latest/admin/users#user-filtering, adding
`created_at` filter as well.
This commit is contained in:
Joobi S B
2024-12-17 09:54:54 +05:30
committed by GitHub
parent f16c80916e
commit e191d9650c
8 changed files with 170 additions and 4 deletions

View File

@ -317,6 +317,8 @@ func (api *API) GetUsers(rw http.ResponseWriter, r *http.Request) ([]database.Us
RbacRole: params.RbacRole,
LastSeenBefore: params.LastSeenBefore,
LastSeenAfter: params.LastSeenAfter,
CreatedAfter: params.CreatedAfter,
CreatedBefore: params.CreatedBefore,
OffsetOpt: int32(paginationParams.Offset),
LimitOpt: int32(paginationParams.Limit),
})