Skip to content

Commit

Permalink
Do not destructure data
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x committed Sep 21, 2023
1 parent 43a7cf9 commit 93ba264
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 7 additions & 6 deletions src/lib/seam/connect/legacy/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ export class LegacyWorkspaces extends Workspaces {
override async get(
params: WorkspacesGetParams = {},
): Promise<WorkspacesGetResponse['workspace']> {
const {
data: { workspace },
} = await this.client.get<WorkspacesGetResponse>('/workspaces/get', {
params,
})
return workspace
const { data } = await this.client.get<WorkspacesGetResponse>(
'/workspaces/get',
{
params,
},
)
return data.workspace
}
}

Expand Down
13 changes: 7 additions & 6 deletions src/lib/seam/connect/routes/workspaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ export class Workspaces {
async get(
params: WorkspacesGetParams = {},
): Promise<WorkspacesGetResponse['workspace']> {
const {
data: { workspace },
} = await this.client.get<WorkspacesGetResponse>('/workspaces/get', {
params,
})
return workspace
const { data } = await this.client.get<WorkspacesGetResponse>(
'/workspaces/get',
{
params,
},
)
return data.workspace
}
}

Expand Down

0 comments on commit 93ba264

Please sign in to comment.