feat(albums): soft-delete albums (admin+owner, hidden & irreversible, both app entries)
契约 deleteAlbum(DELETE /albums/{albumId} → 204 幂等)+ status enum 'deleted':
- 服务端:softDelete(canView 404→canManage 403 防枚举;乐观锁 claim +
outbox album.updated priority=high + audit album.delete);列表/详情/更新/
成员/资产/分类/水印/照片/展示位绑定全部 deleted→404;公开端 cn
(status!=='active')与 ov(isAlbumVisibleOv)天然屏蔽;ov 副本经
album.updated 载荷 status 直投自动下线
- Admin:列表表格操作「删除」+ 详情页头「删除相册」(确认含不可恢复说明)
- App:操作面板「删除相册」(红字、二次确认、成功退回列表并刷新)
- 验证:API 56/56、App 397/397(analyze 0)、admin typecheck/lint/test/build 绿
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -264,6 +264,14 @@ describe('embed slots (e2e)', () => {
|
||||
intervalMs: 5000,
|
||||
lang: 'auto',
|
||||
collapsedDefault: false,
|
||||
// UI-04 新字段(旧形状创建 → 归一化默认:carousel/16/true)。
|
||||
imageFit: 'contain',
|
||||
offsetX: 16,
|
||||
offsetBottom: 24,
|
||||
zIndex: 1000,
|
||||
displayMode: 'carousel',
|
||||
scrollSpeed: 16,
|
||||
reactionsEnabled: true,
|
||||
},
|
||||
updatedAt: expect.any(String),
|
||||
});
|
||||
@@ -294,6 +302,9 @@ describe('embed slots (e2e)', () => {
|
||||
offsetX: 16,
|
||||
offsetBottom: 24,
|
||||
zIndex: 1000,
|
||||
displayMode: 'carousel',
|
||||
scrollSpeed: 16,
|
||||
reactionsEnabled: true,
|
||||
});
|
||||
|
||||
// 校验失败:settings 缺字段 / intervalMs 越界 / 空 name。
|
||||
@@ -794,6 +805,9 @@ describe('embed slots (e2e)', () => {
|
||||
offsetX: 40,
|
||||
offsetBottom: 80,
|
||||
zIndex: 5000,
|
||||
displayMode: 'carousel',
|
||||
scrollSpeed: 16,
|
||||
reactionsEnabled: true,
|
||||
});
|
||||
|
||||
// 新字段校验:非法枚举/越界/非整数 → 400(老字段约束不回归)。
|
||||
@@ -845,6 +859,9 @@ describe('embed slots (e2e)', () => {
|
||||
offsetX: 16,
|
||||
offsetBottom: 24,
|
||||
zIndex: 1000,
|
||||
displayMode: 'carousel',
|
||||
scrollSpeed: 16,
|
||||
reactionsEnabled: true,
|
||||
};
|
||||
expect(patched.body.settings).toEqual(normalizedFull);
|
||||
|
||||
@@ -868,6 +885,9 @@ describe('embed slots (e2e)', () => {
|
||||
offsetX: 8,
|
||||
offsetBottom: 120,
|
||||
zIndex: 999,
|
||||
displayMode: 'carousel',
|
||||
scrollSpeed: 16,
|
||||
reactionsEnabled: true,
|
||||
};
|
||||
expect(explicit.body.settings).toEqual(explicitFull);
|
||||
|
||||
@@ -911,6 +931,9 @@ describe('embed slots (e2e)', () => {
|
||||
offsetX: 16,
|
||||
offsetBottom: 24,
|
||||
zIndex: 1000,
|
||||
displayMode: 'carousel',
|
||||
scrollSpeed: 16,
|
||||
reactionsEnabled: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user