mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 18:15:39 +00:00
feat: define captcha_exists interface
This commit is contained in:
@@ -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)]
|
||||
|
||||
Reference in New Issue
Block a user