about summary refs log tree commit diff
path: root/src/database/file/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/database/file/mod.rs')
-rw-r--r--src/database/file/mod.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/database/file/mod.rs b/src/database/file/mod.rs
index 9e33f0b..dff527f 100644
--- a/src/database/file/mod.rs
+++ b/src/database/file/mod.rs
@@ -322,7 +322,10 @@ impl Storage for FileStorage {
     }
 
     async fn delete_post<'a>(&self, url: &'a str) -> Result<()> {
-        todo!()
+        let path = url_to_path(&self.root_dir, url);
+        if let Err(e) = async_std::fs::remove_file(path).await {
+            Err(e.into())
+        } else { Ok(()) }
     }
 
     async fn get_setting<'a>(&self, setting: &'a str, user: &'a str) -> Result<String> {