fix: create psuedo id and setup publishing for those tht have opted in

This commit is contained in:
Aravinth Manivannan 2023-10-20 01:39:19 +05:30
parent eab146b121
commit 3d02f55241
No known key found for this signature in database
GPG key ID: F8F50389936984FF

View file

@ -85,10 +85,17 @@ pub mod runner {
data.db data.db
.add_captcha_levels(username, &key, &payload.levels) .add_captcha_levels(username, &key, &payload.levels)
.await?; .await?;
if payload.publish_benchmarks {
data.db.analytics_create_psuedo_id_if_not_exists(&key).await?;;
}
let mcaptcha_config = MCaptchaDetails { let mcaptcha_config = MCaptchaDetails {
name: payload.description.clone(), name: payload.description.clone(),
key, key,
}; };
Ok(mcaptcha_config) Ok(mcaptcha_config)
} }
} }