@@ -1081,27 +1081,25 @@ class ApiMethods {
1081
1081
} ;
1082
1082
1083
1083
getWorkspaceByOwnerAndName = async (
1084
- username : string | undefined ,
1084
+ username : string ,
1085
1085
workspaceName : string ,
1086
1086
params ?: TypesGen . WorkspaceOptions ,
1087
1087
) : Promise < TypesGen . Workspace > => {
1088
- const user = username || "me" ;
1089
1088
const response = await this . axios . get < TypesGen . Workspace > (
1090
- `/api/v2/users/${ user } /workspace/${ workspaceName } ` ,
1089
+ `/api/v2/users/${ username } /workspace/${ workspaceName } ` ,
1091
1090
{ params } ,
1092
1091
) ;
1093
1092
1094
1093
return response . data ;
1095
1094
} ;
1096
1095
1097
1096
getWorkspaceBuildByNumber = async (
1098
- username : string | undefined ,
1097
+ username : string ,
1099
1098
workspaceName : string ,
1100
1099
buildNumber : number ,
1101
1100
) : Promise < TypesGen . WorkspaceBuild > => {
1102
- const name = username || "me" ;
1103
1101
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 } ` ,
1105
1103
) ;
1106
1104
1107
1105
return response . data ;
@@ -1282,12 +1280,11 @@ class ApiMethods {
1282
1280
} ;
1283
1281
1284
1282
createWorkspace = async (
1285
- userId : string | undefined ,
1283
+ userId : string ,
1286
1284
workspace : TypesGen . CreateWorkspaceRequest ,
1287
1285
) : Promise < TypesGen . Workspace > => {
1288
- const id = userId || "me" ;
1289
1286
const response = await this . axios . post < TypesGen . Workspace > (
1290
- `/api/v2/users/${ id } /workspaces` ,
1287
+ `/api/v2/users/${ userId } /workspaces` ,
1291
1288
workspace ,
1292
1289
) ;
1293
1290
0 commit comments