fix(canvas): 画布 - 防止旧内容覆盖并支持版本历史恢复

This commit is contained in:
kinoko committed 2026-09-17 18:40:42 +08:00
1 parent b6bae4f957
commit 35ebed3097
69 files changed
+3575 -294

No files matched your search

+1 -1
View File
@@ -609,7 +609,7 @@ func (s *Service) UnlinkCanvasProject(userID string, projectID string, canvasID
return err
}
// 关系列、同步快照和更新时间必须原子更新,否则浏览器会用旧 projectId 把关系重新写回。
return s.repo.UnassignCanvasFromProject(userID, projectID, canvas.ID, payloadJSON, now)
return s.repo.UnassignCanvasFromProject(userID, projectID, canvas.ID, payloadJSON, now, canvas.Revision)
}
func canvasPayloadWithoutProject(payloadJSON string, updatedAt time.Time) (string, error) {