feat: define interface for updating user secret

This commit is contained in:
realaravinth
2022-05-12 10:20:41 +05:30
parent 25b3d316db
commit d4a080b5fc
2 changed files with 11 additions and 0 deletions

View File

@@ -128,6 +128,9 @@ pub trait MCDatabase: std::marker::Send + std::marker::Sync + CloneSPDatabase {
/// get a user's secret
async fn get_secret(&self, username: &str) -> DBResult<Secret>;
/// update a user's secret
async fn update_secret(&self, username: &str, secret: &str) -> DBResult<()>;
}
#[derive(Clone, Debug, Deserialize, Serialize)]