From 7f5c50dfeb3d835b755e4cbf6ea704385a5e64cc Mon Sep 17 00:00:00 2001 From: hunteraraujo Date: Sat, 16 Sep 2023 10:39:33 -0700 Subject: [PATCH] Extend ReportRequestBody to Include "mock" Boolean Field This commit adds a new boolean field, "mock", to the `ReportRequestBody` class. This additional field is in line with the new requirements to specify whether the report is a mock or not. The `toJson()` method is also updated to include this new field during serialization. --- .../lib/models/benchmark_service/report_request_body.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/lib/models/benchmark_service/report_request_body.dart b/frontend/lib/models/benchmark_service/report_request_body.dart index 3cda0995a..9278ad8a6 100644 --- a/frontend/lib/models/benchmark_service/report_request_body.dart +++ b/frontend/lib/models/benchmark_service/report_request_body.dart @@ -1,13 +1,16 @@ class ReportRequestBody { final String category; final List tests; + final bool mock; - ReportRequestBody({required this.category, required this.tests}); + ReportRequestBody( + {required this.category, required this.tests, required this.mock}); Map toJson() { return { 'category': category, 'tests': tests, + 'mock': mock, }; } }