Skip to content

Commit 2613d5f

Browse files
authored
fix: insert scan_id for report (#13)
1 parent 9da48cf commit 2613d5f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

upload-file/metadata/insert_scan_report.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ import (
88
)
99

1010
func InsertScanReport(ctx context.Context, c *upload.Client, scanID, reportPath string) error {
11-
req := graphql.NewRequest(`mutation InsertScanReport($report_uri: string!) {
12-
insert_vulnerability_reports_scan_reports(objects: {report_uri: $report_uri}) {
11+
req := graphql.NewRequest(`mutation InsertScanReport($scan_id: uuid, $report_uri: string!) {
12+
insert_vulnerability_reports_scan_reports(
13+
objects: {scan_id: $scan_id, report_uri: $report_uri}
14+
) {
1315
returning {
1416
id
1517
}
1618
}
1719
}`)
20+
req.Var("scan_id", scanID)
1821
req.Var("report_uri", reportPath)
1922

2023
var response struct {

0 commit comments

Comments
 (0)