about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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> {