add: product types
This commit is contained in:
parent
aea764948c
commit
2705608903
5 changed files with 89 additions and 11 deletions
|
@ -321,7 +321,7 @@ impl DataManager {
|
|||
/// * `id` - the ID of the user
|
||||
/// * `password` - the current password of the user
|
||||
/// * `force` - if we should delete even if the given password is incorrect
|
||||
pub async fn delete_user(&self, id: usize, password: &str, force: bool) -> Result<()> {
|
||||
pub async fn delete_user(&self, id: usize, password: &str, force: bool) -> Result<User> {
|
||||
let user = self.get_user_by_id(id).await?;
|
||||
|
||||
if (hash_salted(password.to_string(), user.salt.clone()) != user.password) && !force {
|
||||
|
@ -581,7 +581,7 @@ impl DataManager {
|
|||
}
|
||||
|
||||
// ...
|
||||
Ok(())
|
||||
Ok(user)
|
||||
}
|
||||
|
||||
pub async fn update_user_verified_status(&self, id: usize, x: bool, user: User) -> Result<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue