fix(*): 素材库与画布 - 修复批量删除刷新、选择布局及工具引用

This commit is contained in:
ddCat committed 2026-09-21 20:14:05 +08:00
1 parent c5b81f696c
commit dc1ad68015
27 files changed
+852 -109

No files matched your search

+14 -2
View File
@@ -98,11 +98,15 @@ func (h canvasHost) StructuredReplacementQuota(userID, kind string, count int, b
return validateStructuredReplacementQuotaWithPolicy(usage, kind, count, bytes, policy.Resource)
}
func (h canvasHost) DeleteUserAssetWithResources(userID, assetID string) error {
func (h canvasHost) DeleteUserAssetWithResources(userID, assetID string, purge bool) error {
if h.svc == nil {
return nil
}
return h.svc.deleteUserAssetWithResources(userID, assetID)
return h.svc.deleteUserAssetWithResources(userID, assetID, purge)
}
func (h canvasHost) PurgeUserAssetsWithResources(userID string, assetIDs []string) error {
return h.svc.deleteUserAssetsWithResources(userID, assetIDs, true)
}
func (h canvasHost) RecordActivity(userID, event string, count int) {
@@ -182,6 +186,14 @@ func (s *Service) DeleteUserAsset(userID string, id string) error {
return s.canvasDomain().DeleteUserAsset(userID, id)
}
func (s *Service) PurgeUserAsset(userID string, id string) error {
return s.canvasDomain().PurgeUserAsset(userID, id)
}
func (s *Service) PurgeUserAssets(userID string, ids []string) error {
return s.canvasDomain().PurgeUserAssets(userID, ids)
}
func (s *Service) UserAssets(userID string) ([]json.RawMessage, error) {
return s.canvasDomain().UserAssets(userID)
}