mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: always show a newly created workspace at the top of the list (#6984)
Fixes #5795.
This commit is contained in:
@@ -480,6 +480,9 @@ func (api *API) postWorkspacesByOrganization(rw http.ResponseWriter, r *http.Req
|
||||
Name: createWorkspace.Name,
|
||||
AutostartSchedule: dbAutostartSchedule,
|
||||
Ttl: dbTTL,
|
||||
// The workspaces page will sort by last used at, and it's useful to
|
||||
// have the newly created workspace at the top of the list!
|
||||
LastUsedAt: database.Now(),
|
||||
})
|
||||
if err != nil {
|
||||
return xerrors.Errorf("insert workspace: %w", err)
|
||||
|
||||
Reference in New Issue
Block a user