修复精选栏用户id显示

公开精选资源接口透传 ownerUserId

精选模型使用 ownerUserId 作为作者兜底

补充前后端回归测试和相关文档
This commit is contained in:
2026-06-24 20:34:30 +08:00
parent db056423de
commit 468bdd5cb5
11 changed files with 76 additions and 3 deletions
@@ -220,6 +220,7 @@ describe('editorProjectClient', () => {
{
resourceId: 'resource-public-1',
projectId: 'editor-project-1',
ownerUserId: 'user-public-author',
label: '公开角色素材',
imageSrc: '/generated-editor-assets/public.png',
width: 512,
@@ -234,6 +235,7 @@ describe('editorProjectClient', () => {
expect(resources).toHaveLength(1);
expect(resources[0]?.resourceId).toBe('resource-public-1');
expect(resources[0]?.ownerUserId).toBe('user-public-author');
expect(requestJsonMock).toHaveBeenCalledWith(
'/api/editor/showcase/resources',
{ method: 'GET' },
@@ -59,6 +59,7 @@ export type EditorProjectResourceSourceType =
export type EditorProjectResourceSnapshot = {
resourceId: string;
projectId: string;
ownerUserId?: string | null;
imageSrc: string;
objectKey?: string | null;
assetObjectId?: string | null;