sl4f_lib/factory_reset/
commands.rsuse crate::factory_reset::facade::FactoryResetFacade;
use crate::factory_reset::types::FactoryResetMethod;
use crate::server::Facade;
use anyhow::Error;
use async_trait::async_trait;
use serde_json::{to_value, Value};
#[async_trait(?Send)]
impl Facade for FactoryResetFacade {
async fn handle_request(&self, method: String, _args: Value) -> Result<Value, Error> {
match method.parse()? {
FactoryResetMethod::FactoryReset => {
let result = self.factory_reset().await?;
Ok(to_value(result)?)
}
}
}
}