feat: define captcha_exists interface

This commit is contained in:
realaravinth
2022-05-12 19:31:26 +05:30
parent 2f924607ab
commit 55518ef650
3 changed files with 13 additions and 4 deletions

View File

@@ -144,6 +144,13 @@ pub trait MCDatabase: std::marker::Send + std::marker::Sync + CloneSPDatabase {
captcha_key: &str,
levels: &[Level],
) -> DBResult<()>;
/// check if captcha exists
async fn captcha_exists(
&self,
username: Option<&str>,
captcha_key: &str,
) -> DBResult<bool>;
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]