Enforce user locks for AI updates

This commit is contained in:
diyaa
2026-09-13 21:20:57 +02:00
parent a39bdbe6fc
commit ae88c6e533
15 changed files with 507 additions and 59 deletions
@@ -24,14 +24,13 @@ public struct StructuredSongProjectUpdateResponse: Codable, Equatable, Sendable
updating existingProject: SongProject,
updatedAt: Date = Date()
) -> SongProjectUpdateResult {
var updatedProject = existingProject
updatedProject.restoreSnapshot(project, updatedAt: updatedAt)
return SongProjectUpdateResult(
project: updatedProject,
SongProjectAIUpdateMerger().apply(
snapshot: project,
changedScopes: changedScopes,
notes: notes,
followUpQuestions: followUpQuestions
followUpQuestions: followUpQuestions,
to: existingProject,
updatedAt: updatedAt
)
}
}