8000 Fix lint · coder/coder@a41c0a7 · GitHub
[go: up one dir, main page]

Skip to content

Commit a41c0a7

Browse files
committed
Fix lint
1 parent c35f497 commit a41c0a7

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

site/src/api/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ class ApiMethods {
11661166
)
11671167
) {
11681168
const { job } = await this.getWorkspaceBuildByNumber(
1169-
build.workspace_owner_name,
1169+
build.workspace_owner_username,
11701170
build.workspace_name,
11711171
build.build_number,
11721172
);

site/src/api/queries/workspaces.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,10 @@ import { checkAuthorization } from "./authCheck";
2727
import { disabledRefetchOptions } from "./util";
2828
import { workspaceBuildsKey } from "./workspaceBuilds";
2929

30-
export const workspaceByOwnerAndNameKey = (owner: string, name: string) => [
31-
"workspace",
32-
owner,
33-
name,
34-
"settings",
35-
];
30+
export const workspaceByOwnerAndNameKey = (
31+
ownerUsername: string,
32+
name: string,
33+
) => ["workspace", ownerUsername, name, "settings"];
3634

3735
export const workspaceByOwnerAndName = (owner: string, name: string) => {
3836
return {
@@ -281,7 +279,7 @@ const updateWorkspaceBuild = async (
281279
queryClient: QueryClient,
282280
) => {
283281
const workspaceKey = workspaceByOwnerAndNameKey(
284-
build.workspace_owner_name,
282+
build.workspace_owner_username,
285283
build.workspace_name,
286284
);
287285
const previousData = queryClient.getQueryData<Workspace>(workspaceKey);

site/src/testHelpers/entities.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,7 +1288,7 @@ export const MockWorkspaceBuild: TypesGen.WorkspaceBuild = {
12881288
updated_at: "2022-05-17T17:39:01.382927298Z",
12891289
workspace_name: "test-workspace",
12901290
workspace_owner_id: MockUserOwner.id,
1291-
workspace_owner_name: MockUserOwner.username,
1291+
workspace_owner_username: MockUserOwner.username,
12921292
workspace_owner_avatar_url: MockUserOwner.avatar_url,
12931293
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
12941294
deadline: "2022-05-17T23:39:00.00Z",
@@ -1316,7 +1316,7 @@ const MockWorkspaceBuildAutostart: TypesGen.WorkspaceBuild = {
13161316
updated_at: "2022-05-17T17:39:01.382927298Z",
13171317
workspace_name: "test-workspace",
13181318
workspace_owner_id: MockUserOwner.id,
1319-
workspace_owner_name: MockUserOwner.username,
1319+
workspace_owner_username: MockUserOwner.username,
13201320
workspace_owner_avatar_url: MockUserOwner.avatar_url,
13211321
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
13221322
deadline: "2022-05-17T23:39:00.00Z",
@@ -1340,7 +1340,7 @@ const MockWorkspaceBuildAutostop: TypesGen.WorkspaceBuild = {
13401340
updated_at: "2022-05-17T17:39:01.382927298Z",
13411341
workspace_name: "test-workspace",
13421342
workspace_owner_id: MockUserOwner.id,
1343-
workspace_owner_name: MockUserOwner.username,
1343+
workspace_owner_username: MockUserOwner.username,
13441344
workspace_owner_avatar_url: MockUserOwner.avatar_url,
13451345
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
13461346
deadline: "2022-05-17T23:39:00.00Z",
@@ -1366,7 +1366,7 @@ export const MockFailedWorkspaceBuild = (
13661366
updated_at: "2022-05-17T17:39:01.382927298Z",
13671367
workspace_name: "test-workspace",
13681368
workspace_owner_id: MockUserOwner.id,
1369-
workspace_owner_name: MockUserOwner.username,
1369+
workspace_owner_username: MockUserOwner.username,
13701370
workspace_owner_avatar_url: MockUserOwner.avatar_url,
13711371
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
13721372
deadline: "2022-05-17T23:39:00.00Z",

0 commit comments

Comments
 (0)
0