db functions to delete media via MXC
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
cc762c49e2
commit
27c29e6063
3 changed files with 58 additions and 1 deletions
|
@ -39,6 +39,15 @@ impl service::media::Data for KeyValueDatabase {
|
|||
Ok(key)
|
||||
}
|
||||
|
||||
fn delete_file_mxc(&self, mxc: String) -> Result<()> {
|
||||
let mut key = mxc.as_bytes().to_vec();
|
||||
key.push(0xff);
|
||||
|
||||
self.mediaid_file.remove(&key)?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn search_file_metadata(
|
||||
&self,
|
||||
mxc: String,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue