Fix id of Items, saving

This commit is contained in:
Christoph Hagen
2025-06-11 08:19:44 +02:00
parent 5970ce2e9f
commit 1d0eba9d78
64 changed files with 233 additions and 217 deletions

View File

@ -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)