refactor: 产品页与产品列表的API重构
- 将产品页与产品列表的API由REST重构为GraphQL - 修改Mapper与单元测试
This commit is contained in:
@ -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: [],
|
||||
|
||||
Reference in New Issue
Block a user