mirror of
https://github.com/coder/coder.git
synced 2026-10-24 01:26:25 +08:00
fix: Sort workspace by name by created_at (#2214)
* fix: Sort workspace by name by created_at Fix bug where deleting workspaces with the same name returns the oldest deleted workspace
This commit is contained in:
+1
-1
@@ -144,7 +144,7 @@ export const getWorkspaces = async (filter?: TypesGen.WorkspaceFilter): Promise<
|
||||
export const getWorkspaceByOwnerAndName = async (
|
||||
username = "me",
|
||||
workspaceName: string,
|
||||
params?: TypesGen.WorkspaceByOwnerAndNameParams,
|
||||
params?: TypesGen.WorkspaceOptions,
|
||||
): Promise<TypesGen.Workspace> => {
|
||||
const response = await axios.get<TypesGen.Workspace>(`/api/v2/users/${username}/workspace/${workspaceName}`, {
|
||||
params,
|
||||
|
||||
@@ -464,11 +464,6 @@ export interface WorkspaceBuildsRequest extends Pagination {
|
||||
readonly WorkspaceID: string
|
||||
}
|
||||
|
||||
// From codersdk/workspaces.go:261:6
|
||||
export interface WorkspaceByOwnerAndNameParams {
|
||||
readonly include_deleted?: boolean
|
||||
}
|
||||
|
||||
// From codersdk/workspaces.go:219:6
|
||||
export interface WorkspaceFilter {
|
||||
readonly organization_id?: string
|
||||
@@ -478,7 +473,7 @@ export interface WorkspaceFilter {
|
||||
|
||||
// From codersdk/workspaces.go:41:6
|
||||
export interface WorkspaceOptions {
|
||||
readonly deleted?: boolean
|
||||
readonly include_deleted?: boolean
|
||||
}
|
||||
|
||||
// From codersdk/workspaceresources.go:21:6
|
||||
|
||||
Reference in New Issue
Block a user