feat: define interface for getting captcha levels

This commit is contained in:
realaravinth
2022-05-13 19:07:27 +05:30
parent 2dff139ae2
commit 04a9bc5cc7
2 changed files with 17 additions and 0 deletions

View File

@@ -176,6 +176,13 @@ pub trait MCDatabase: std::marker::Send + std::marker::Sync + CloneSPDatabase {
/// Delete captcha
async fn delete_captcha(&self, username: &str, captcha_key: &str) -> DBResult<()>;
/// Get captcha levels
async fn get_captcha_levels(
&self,
username: Option<&str>,
captcha_key: &str,
) -> DBResult<Vec<Level>>;
}
#[derive(Clone, Debug, Default, Deserialize, Serialize)]