From 3d02f552413a556ab9c0b26a004f7b94de624581 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Fri, 20 Oct 2023 01:39:19 +0530 Subject: [PATCH] fix: create psuedo id and setup publishing for those tht have opted in --- src/api/v1/mcaptcha/create.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/api/v1/mcaptcha/create.rs b/src/api/v1/mcaptcha/create.rs index 863b440e..6321f045 100644 --- a/src/api/v1/mcaptcha/create.rs +++ b/src/api/v1/mcaptcha/create.rs @@ -85,10 +85,17 @@ pub mod runner { data.db .add_captcha_levels(username, &key, &payload.levels) .await?; + + if payload.publish_benchmarks { + data.db.analytics_create_psuedo_id_if_not_exists(&key).await?;; + } + + let mcaptcha_config = MCaptchaDetails { name: payload.description.clone(), key, }; + Ok(mcaptcha_config) } }