Skip to content

Commit

Permalink
fix: upstream response types fixed, can remove type assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
Codex- committed Oct 2, 2024
1 parent 608120f commit c228c4b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,8 @@ export async function getWorkflowId(workflowFilename: string): Promise<number> {
`Failed to get workflows, expected 200 but received ${response.status}`,
);
}
// wrong type definition
const workflows: typeof response.data.workflows = response.data;

workflowId = workflows.find((workflow) =>
workflowId = response.data.find((workflow) =>
new RegExp(sanitisedFilename).test(workflow.path),
)?.id;

Expand Down

0 comments on commit c228c4b

Please sign in to comment.