Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix types
  • Loading branch information
BrunoQuaresma committed Oct 4, 2023
commit fc41851c69b528c5cedd0bd3d8f73b77fa4a3b69
4 changes: 2 additions & 2 deletions codersdk/workspaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ func (c *Client) getWorkspace(ctx context.Context, id uuid.UUID, opts ...Request
}

type WorkspaceBuildsRequest struct {
WorkspaceID uuid.UUID
WorkspaceID uuid.UUID `json:"workspace_id" typescript:"-"`
Pagination
Since time.Time
Since time.Time `json:"since,omitempty"`
}

func (c *Client) WorkspaceBuilds(ctx context.Context, req WorkspaceBuildsRequest) ([]WorkspaceBuild, error) {
Expand Down
2 changes: 1 addition & 1 deletion site/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ export const getWorkspaceBuilds = async (
workspaceId: string,
req?: TypesGen.WorkspaceBuildsRequest,
) => {
const response = await axios.get<TypesGen.WorkspaceBuildsResponse>(
const response = await axios.get<TypesGen.WorkspaceBuild[]>(
getURLWithSearchParams(`/api/v2/workspaces/${workspaceId}/builds`, req),
);
return response.data;
Expand Down
6 changes: 0 additions & 6 deletions site/src/api/typesGenerated.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion site/src/pages/WorkspaceBuildPage/WorkspaceBuildPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const WorkspaceBuildPage: FC = () => {
<WorkspaceBuildPageView
logs={logs}
build={build}
builds={buildsQuery.data?.builds}
builds={buildsQuery.data}
activeBuildNumber={buildNumber}
/>
</>
Expand Down
2 changes: 1 addition & 1 deletion site/src/pages/WorkspacePage/WorkspacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export const WorkspacePage: FC = () => {
workspaceState={workspaceState}
quota={quotaQuery.data}
workspaceSend={workspaceSend}
builds={buildsQuery.data?.builds}
builds={buildsQuery.data}
buildsError={buildsQuery.error}
/>
</RequirePermission>
Expand Down