fix(canvas): 画布 - 防止旧内容覆盖并支持版本历史恢复
This commit is contained in:
1 parent
b6bae4f957
commit
35ebed3097
69 files changed
+3575
-294
No files matched your search
@@ -246,7 +246,7 @@ func (s *Service) CommitCreationCanvas(userID, id string, req CreationRequest) (
|
||||
if err = validateStructuredStorageQuotaWithPolicy(usage, "canvas", false, int64(len(req.Document)-len(previous)), policy.Resource); err != nil {
|
||||
return err
|
||||
}
|
||||
if err = repo.CompareSaveCreationCanvas(canvas, previous); err != nil {
|
||||
if err = saveCreationCanvasWithHistory(repo, canvas, previous); err != nil {
|
||||
return err
|
||||
}
|
||||
out = map[string]any{"snapshotHash": creationHash(doc)}
|
||||
|
||||
Reference in new issue
Block a user