Skip to content

Commit ba3f15d

Browse files
committed
Update ui api call
1 parent 67423fb commit ba3f15d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

site/src/api/api.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,10 @@ export const getWorkspace = async (workspaceId: string): Promise<TypesGen.Worksp
115115
return response.data
116116
}
117117

118-
export const getWorkspaces = async (userID = "me"): Promise<TypesGen.Workspace[]> => {
119-
const response = await axios.get<TypesGen.Workspace[]>(`/api/v2/users/${userID}/workspaces`)
118+
// TODO: @emyrk add query params as arguments. Supports 'organization_id' and 'owner'
119+
// 'owner' can be a username, user_id, or 'me'
120+
export const getWorkspaces = async (): Promise<TypesGen.Workspace[]> => {
121+
const response = await axios.get<TypesGen.Workspace[]>(`/api/v2/workspaces`)
120122
return response.data
121123
}
122124

0 commit comments

Comments
 (0)