refactor: 产品页与产品列表的API重构

- 将产品页与产品列表的API由REST重构为GraphQL
- 修改Mapper与单元测试
This commit is contained in:
2025-11-11 15:58:15 +08:00
parent 7e7775ccc6
commit 691dd34127
8 changed files with 225 additions and 145 deletions

View File

@ -10,7 +10,9 @@ describe('toProductListView', () => {
translations: [
{ id: 10, name: 'Product Name', summary: 'Product Summary' },
],
cover: 'cover-file-uuid-1234',
cover: {
id: 'cover-file-uuid-1234',
},
product_type: {
id: 1,
translations: [{ id: 20, name: 'Type Name' }],
@ -35,7 +37,9 @@ describe('toProductListView', () => {
const rawData: Product = {
id: 1,
translations: [],
cover: 'cover-file-uuid-1234',
cover: {
id: 'cover-file-uuid-1234',
},
product_type: {
id: 20,
translations: [],