Remove the experimental feature seen

This commit is contained in:
Tamo 2024-10-17 09:35:11 +02:00
parent d9115b74f0
commit 18ac4032aa

View File

@ -17,24 +17,19 @@ use crate::extractors::sequential_extractor::SeqHandler;
pub fn configure(cfg: &mut web::ServiceConfig) { pub fn configure(cfg: &mut web::ServiceConfig) {
cfg.service( cfg.service(
web::resource("") web::resource("")
.route(web::get().to(SeqHandler(get_features))) .route(web::get().to(get_features))
.route(web::patch().to(SeqHandler(patch_features))), .route(web::patch().to(SeqHandler(patch_features))),
); );
} }
crate::empty_analytics!(GetExperimentalFeatureAnalytics, "Experimental features Seen");
async fn get_features( async fn get_features(
index_scheduler: GuardedData< index_scheduler: GuardedData<
ActionPolicy<{ actions::EXPERIMENTAL_FEATURES_GET }>, ActionPolicy<{ actions::EXPERIMENTAL_FEATURES_GET }>,
Data<IndexScheduler>, Data<IndexScheduler>,
>, >,
req: HttpRequest,
analytics: Data<Analytics>,
) -> HttpResponse { ) -> HttpResponse {
let features = index_scheduler.features(); let features = index_scheduler.features();
analytics.publish(GetExperimentalFeatureAnalytics::default(), &req);
let features = features.runtime_features(); let features = features.runtime_features();
debug!(returns = ?features, "Get features"); debug!(returns = ?features, "Get features");
HttpResponse::Ok().json(features) HttpResponse::Ok().json(features)