From 81ce80e71159e6c27cd0e95187591fedec25b7f0 Mon Sep 17 00:00:00 2001 From: Nikhil Sinha Date: Tue, 16 Jul 2024 15:25:26 +0530 Subject: [PATCH] add send_analytics flag in about API response About API response will have a new field - sendAnalytics with value of true/false based on value set in env var P_SEND_ANONYMOUS_USAGE_DATA default for this env var is true. --- server/src/handlers/http/about.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/src/handlers/http/about.rs b/server/src/handlers/http/about.rs index 1603139ff..0cacbb7e4 100644 --- a/server/src/handlers/http/about.rs +++ b/server/src/handlers/http/about.rs @@ -94,6 +94,8 @@ pub async fn about() -> Json { ) }; + let send_analytics = CONFIG.parseable.send_analytics; + Json(json!({ "version": current_version, "uiVersion": ui_version, @@ -112,6 +114,7 @@ pub async fn about() -> Json { "store": { "type": CONFIG.get_storage_mode_string(), "path": store_endpoint - } + }, + "sendAnalytics": send_analytics })) }