Skip to content

Commit

Permalink
Fixed creation of finding
Browse files Browse the repository at this point in the history
  • Loading branch information
myOmikron committed Mar 26, 2024
1 parent 05ca8d7 commit 3f468ff
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ export function WorkspaceCreateFinding(props: CreateFindingProps) {
return {
_data: data satisfies LocalAffected["_data"],
type: type satisfies LocalAffected["type"],
uuid: data.uuid,
details: "",
} as LocalAffected;
}),
);
Expand Down Expand Up @@ -284,11 +286,12 @@ export function WorkspaceCreateFinding(props: CreateFindingProps) {
.then(
handleApiError(async ({ uuid }) => {
await Promise.all(
affectedUploaded.map((a) =>
Api.workspaces.findings
affectedUploaded.map((a) => {
console.log(a);
return Api.workspaces.findings
.addAffected(workspace, uuid, a)
.then(handleApiError()),
),
.then(handleApiError());
}),
);
ROUTES.WORKSPACE_FINDINGS_LIST.visit({ uuid: workspace });
toast.success("Created finding");
Expand Down

0 comments on commit 3f468ff

Please sign in to comment.