feat: Allow users to change their password
This commit is contained in:
parent
1eda645f89
commit
5a5e10459b
8 changed files with 273 additions and 1 deletions
|
|
@ -155,6 +155,18 @@ impl DatabaseInterface for FilesystemDatabase {
|
|||
Ok(Ok(()))
|
||||
}
|
||||
|
||||
async fn change_password(
|
||||
&mut self,
|
||||
user: &User,
|
||||
new_password: String,
|
||||
) -> Result<(), BoxedError> {
|
||||
let mut new_db = self.inner.clone();
|
||||
|
||||
new_db.change_password(user, new_password).await?;
|
||||
self.save(new_db).await?;
|
||||
Ok(())
|
||||
}
|
||||
|
||||
async fn list_all_domains(&self) -> Result<Vec<Domain>, BoxedError> {
|
||||
self.inner.list_all_domains().await
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue