mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add last_used search params to workspaces (#9230)
* feat: add last_used search params to workspaces
This commit is contained in:
@@ -6064,6 +6064,18 @@ func (q *FakeQuerier) GetAuthorizedWorkspaces(ctx context.Context, arg database.
|
||||
continue
|
||||
}
|
||||
|
||||
if !arg.LastUsedBefore.IsZero() {
|
||||
if workspace.LastUsedAt.After(arg.LastUsedBefore) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if !arg.LastUsedAfter.IsZero() {
|
||||
if workspace.LastUsedAt.Before(arg.LastUsedAfter) {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
if arg.Status != "" {
|
||||
build, err := q.getLatestWorkspaceBuildByWorkspaceIDNoLock(ctx, workspace.ID)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user