Skip to content

Commit

Permalink
add send_analytics flag in about API response (#850)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nikhilsinhaparseable authored Jul 16, 2024
1 parent 5133d1b commit 2b09db6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/handlers/http/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ pub async fn about() -> Json<serde_json::Value> {
)
};

let send_analytics = CONFIG.parseable.send_analytics;

Json(json!({
"version": current_version,
"uiVersion": ui_version,
Expand All @@ -112,6 +114,7 @@ pub async fn about() -> Json<serde_json::Value> {
"store": {
"type": CONFIG.get_storage_mode_string(),
"path": store_endpoint
}
},
"sendAnalytics": send_analytics
}))
}

0 comments on commit 2b09db6

Please sign in to comment.