Improve storage
This commit is contained in:
@ -73,9 +73,7 @@ final class Post: ObservableObject {
|
||||
|
||||
@discardableResult
|
||||
func update(id newId: String) -> Bool {
|
||||
do {
|
||||
try content.storage.move(post: id, to: newId)
|
||||
} catch {
|
||||
guard content.storage.move(post: id, to: newId) else {
|
||||
print("Failed to move file of post \(id)")
|
||||
return false
|
||||
}
|
||||
|
Reference in New Issue
Block a user