Skip to content

Commit dac8ada

Browse files
committed
Improve parameters name
1 parent a64cdcd commit dac8ada

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

site/src/api/queries/workspaces.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const createWorkspace = (queryClient: QueryClient) => {
5757
type AutoCreateWorkspaceOptions = {
5858
organizationId: string;
5959
templateName: string;
60-
name: string;
60+
workspaceName: string;
6161
/**
6262
* If provided, the auto-create workspace feature will attempt to find a
6363
* matching workspace. If found, it will return the existing workspace instead
@@ -66,7 +66,7 @@ type AutoCreateWorkspaceOptions = {
6666
* multiple values are returned, the first one will be returned.
6767
*/
6868
match: string | null;
69-
versionId?: string;
69+
templateVersionId?: string;
7070
buildParameters?: WorkspaceBuildParameter[];
7171
};
7272

@@ -75,8 +75,8 @@ export const autoCreateWorkspace = (queryClient: QueryClient) => {
7575
mutationFn: async ({
7676
organizationId,
7777
templateName,
78-
name,
79-
versionId,
78+
workspaceName,
79+
templateVersionId,
8080
buildParameters,
8181
match,
8282
}: AutoCreateWorkspaceOptions) => {
@@ -91,8 +91,8 @@ export const autoCreateWorkspace = (queryClient: QueryClient) => {
9191

9292
let templateVersionParameters;
9393

94-
if (versionId) {
95-
templateVersionParameters = { template_version_id: versionId };
94+
if (templateVersionId) {
95+
templateVersionParameters = { template_version_id: templateVersionId };
9696
} else {
9797
const template = await API.getTemplateByName(
9898
organizationId,
@@ -103,7 +103,7 @@ export const autoCreateWorkspace = (queryClient: QueryClient) => {
103103

104104
return API.createWorkspace(organizationId, "me", {
105105
...templateVersionParameters,
106-
name,
106+
name: workspaceName,
107107
rich_parameter_values: buildParameters,
108108
});
109109
},

0 commit comments

Comments
 (0)