From 593f9b83b45ad9023eafaeedd662db78c408b40e Mon Sep 17 00:00:00 2001 From: Jacob Rothstein Date: Thu, 17 Aug 2023 16:58:26 -0700 Subject: [PATCH] s/dap_version/protocol/ because the value includes `dap` and therefore is redundant --- aggregator_api/src/models.rs | 2 +- aggregator_api/src/routes.rs | 2 +- aggregator_api/src/tests.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/aggregator_api/src/models.rs b/aggregator_api/src/models.rs index 579e04cd9..000ac6c67 100644 --- a/aggregator_api/src/models.rs +++ b/aggregator_api/src/models.rs @@ -23,7 +23,7 @@ pub(crate) enum AggregatorRole { #[derive(Serialize, PartialEq, Eq, Debug)] pub(crate) struct AggregatorApiConfig { - pub dap_version: &'static str, + pub protocol: &'static str, pub dap_url: Url, pub role: AggregatorRole, pub vdafs: Vec, diff --git a/aggregator_api/src/routes.rs b/aggregator_api/src/routes.rs index bbd1ebbb4..c0b26c5b0 100644 --- a/aggregator_api/src/routes.rs +++ b/aggregator_api/src/routes.rs @@ -33,7 +33,7 @@ pub(super) async fn get_config( State(config): State>, ) -> Json { Json(AggregatorApiConfig { - dap_version: "DAP-05", + protocol: "DAP-05", dap_url: config.public_dap_url.clone(), role: AggregatorRole::Either, vdafs: vec![ diff --git a/aggregator_api/src/tests.rs b/aggregator_api/src/tests.rs index bf5a0bec5..6645e7bda 100644 --- a/aggregator_api/src/tests.rs +++ b/aggregator_api/src/tests.rs @@ -82,7 +82,7 @@ async fn get_config() { .await, Status::Ok, concat!( - r#"{"dap_version":"DAP-05","dap_url":"https://dap.url/","role":"Either","vdafs":"#, + r#"{"protocol":"DAP-05","dap_url":"https://dap.url/","role":"Either","vdafs":"#, r#"["Prio3Count","Prio3Sum","Prio3Histogram","Prio3CountVec","Prio3SumVec"],"#, r#""query_types":["TimeInterval","FixedSize"]}"# )