Fix id of Items, saving
This commit is contained in:
@ -43,7 +43,7 @@ struct PostDetailView: View {
|
||||
}
|
||||
|
||||
IdPropertyView(
|
||||
id: $post.id,
|
||||
id: $post.identifier,
|
||||
footer: "The id is used to link to post and store them",
|
||||
validation: post.isValid,
|
||||
update: { post.update(id: $0) })
|
||||
@ -99,8 +99,8 @@ struct PostDetailView: View {
|
||||
}
|
||||
|
||||
private func deletePost() {
|
||||
guard content.storage.delete(post: post.id) else {
|
||||
print("Post '\(post.id)': Failed to delete file in content folder")
|
||||
guard content.storage.delete(post: post.identifier) else {
|
||||
print("Post '\(post.identifier)': Failed to delete file in content folder")
|
||||
return
|
||||
}
|
||||
content.remove(post)
|
||||
|
Reference in New Issue
Block a user