mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-12 02:25:41 +00:00
feat: advance sitekey edit now allows modifying publication status
This commit is contained in:
@@ -76,6 +76,7 @@ pub struct UpdateCaptcha {
|
||||
pub duration: u32,
|
||||
pub description: String,
|
||||
pub key: String,
|
||||
pub publish_benchmarks: bool,
|
||||
}
|
||||
|
||||
#[my_codegen::post(
|
||||
@@ -139,6 +140,16 @@ pub mod runner {
|
||||
e
|
||||
);
|
||||
}
|
||||
|
||||
if payload.publish_benchmarks {
|
||||
data.db
|
||||
.analytics_create_psuedo_id_if_not_exists(&payload.key)
|
||||
.await?;
|
||||
} else {
|
||||
data.db
|
||||
.analytics_delete_all_records_for_campaign(&payload.key)
|
||||
.await?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user