feat: define interfaces for delete_captcha_levels and delete_captcha

This commit is contained in:
realaravinth
2022-05-12 19:55:03 +05:30
parent 0c1a82b4c5
commit af46a3c54d
2 changed files with 20 additions and 0 deletions

View File

@@ -151,6 +151,16 @@ pub trait MCDatabase: std::marker::Send + std::marker::Sync + CloneSPDatabase {
username: Option<&str>,
captcha_key: &str,
) -> DBResult<bool>;
/// Delete all levels of a captcha
async fn delete_captcha_levels(
&self,
username: &str,
captcha_key: &str,
) -> DBResult<()>;
/// Delete captcha
async fn delete_captcha(&self, username: &str, captcha_key: &str) -> DBResult<()>;
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]