Add button to remove post

This commit is contained in:
Christoph Hagen
2025-05-04 11:48:09 +02:00
parent d6502fb09c
commit 329519e15b
6 changed files with 56 additions and 0 deletions

View File

@ -186,6 +186,16 @@ final class Storage: ObservableObject {
return contentScope.move(postFilePath(post: postId), to: postFilePath(post: newId))
}
/**
Completely delete a post file from the content folder
*/
func delete(post postId: String) -> Bool {
guard let contentScope else {
return false
}
return contentScope.deleteFile(at: postFilePath(post: postId))
}
// MARK: Tags
private func tagFileName(tagId: String) -> String {