This commit is contained in:
Aiden McClelland
2023-06-09 16:22:33 -06:00
committed by Matt Hill
parent 3ccbc626ff
commit df88a55784
8 changed files with 101 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ pub async fn experimental() -> Result<(), Error> {
#[command(display(display_none))]
pub async fn zram(#[context] ctx: RpcContext, #[arg] enable: bool) -> Result<(), Error> {
let mut db = ctx.db.handle();
let zram = crate::db::DatabaseModel::new()
let mut zram = crate::db::DatabaseModel::new()
.server_info()
.zram()
.get_mut(&mut db)
@@ -74,6 +74,7 @@ pub async fn zram(#[context] ctx: RpcContext, #[arg] enable: bool) -> Result<(),
.await
.with_kind(ErrorKind::Zram)?;
}
zram.save(&mut db).await?;
Ok(())
}