Skip to content

Commit ca8e94f

Browse files
committed
fix: streamline biome fixes
1 parent 04a3846 commit ca8e94f

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

site/src/api/api.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,27 +1081,25 @@ class ApiMethods {
10811081
};
10821082

10831083
getWorkspaceByOwnerAndName = async (
1084-
username: string | undefined,
1084+
username: string,
10851085
workspaceName: string,
10861086
params?: TypesGen.WorkspaceOptions,
10871087
): Promise<TypesGen.Workspace> => {
1088-
const user = username || "me";
10891088
const response = await this.axios.get<TypesGen.Workspace>(
1090-
`/api/v2/users/${user}/workspace/${workspaceName}`,
1089+
`/api/v2/users/${username}/workspace/${workspaceName}`,
10911090
{ params },
10921091
);
10931092

10941093
return response.data;
10951094
};
10961095

10971096
getWorkspaceBuildByNumber = async (
1098-
username: string | undefined,
1097+
username: string,
10991098
workspaceName: string,
11001099
buildNumber: number,
11011100
): Promise<TypesGen.WorkspaceBuild> => {
1102-
const name = username || "me";
11031101
const response = await this.axios.get<TypesGen.WorkspaceBuild>(
1104-
`/api/v2/users/${name}/workspace/${workspaceName}/builds/${buildNumber}`,
1102+
`/api/v2/users/${username}/workspace/${workspaceName}/builds/${buildNumber}`,
11051103
);
11061104

11071105
return response.data;
@@ -1282,12 +1280,11 @@ class ApiMethods {
12821280
};
12831281

12841282
createWorkspace = async (
1285-
userId: string | undefined,
1283+
userId: string,
12861284
workspace: TypesGen.CreateWorkspaceRequest,
12871285
): Promise<TypesGen.Workspace> => {
1288-
const id = userId || "me";
12891286
const response = await this.axios.post<TypesGen.Workspace>(
1290-
`/api/v2/users/${id}/workspaces`,
1287+
`/api/v2/users/${userId}/workspaces`,
12911288
workspace,
12921289
);
12931290

0 commit comments

Comments
 (0)