mirror of
https://github.com/hexastack/hexabot
synced 2025-04-18 21:35:06 +00:00
fix: add requested changes
This commit is contained in:
parent
82f46ad65e
commit
e0865ea3e5
@ -256,8 +256,8 @@ describe('ContentController', () => {
|
|||||||
image: 'image.jpg',
|
image: 'image.jpg',
|
||||||
},
|
},
|
||||||
id: '',
|
id: '',
|
||||||
createdAt: null as unknown as Date,
|
createdAt: new Date(),
|
||||||
updatedAt: null as unknown as Date,
|
updatedAt: new Date(),
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@ -267,7 +267,7 @@ describe('ContentController', () => {
|
|||||||
mockContentType.id,
|
mockContentType.id,
|
||||||
mockContentType,
|
mockContentType,
|
||||||
);
|
);
|
||||||
expect(result).toEqual([
|
expect(result).toEqualPayload([
|
||||||
{
|
{
|
||||||
entity: mockContentType.id,
|
entity: mockContentType.id,
|
||||||
title: 'store 3',
|
title: 'store 3',
|
||||||
@ -276,8 +276,6 @@ describe('ContentController', () => {
|
|||||||
image: 'image.jpg',
|
image: 'image.jpg',
|
||||||
},
|
},
|
||||||
id: '',
|
id: '',
|
||||||
createdAt: null as unknown as Date,
|
|
||||||
updatedAt: null as unknown as Date,
|
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
});
|
});
|
||||||
|
@ -100,7 +100,7 @@ export const Contents = () => {
|
|||||||
const { data: contentType } = useGet(String(query.id), {
|
const { data: contentType } = useGet(String(query.id), {
|
||||||
entity: EntityType.CONTENT_TYPE,
|
entity: EntityType.CONTENT_TYPE,
|
||||||
});
|
});
|
||||||
const { mutateAsync: importDataset, isLoading } = useImport(
|
const { mutate: importDataset, isLoading } = useImport(
|
||||||
EntityType.CONTENT,
|
EntityType.CONTENT,
|
||||||
{
|
{
|
||||||
onError: () => {
|
onError: () => {
|
||||||
@ -125,11 +125,11 @@ export const Contents = () => {
|
|||||||
},
|
},
|
||||||
{ idTargetContentType: contentType?.id }
|
{ idTargetContentType: contentType?.id }
|
||||||
);
|
);
|
||||||
const handleImportChange = async (file: File) => {
|
const handleImportChange = (file: File) => {
|
||||||
await importDataset(file);
|
importDataset(file);
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid container flexDirection="column" gap={3}>
|
<Grid container flexDirection="column" gap={3}>
|
||||||
<Grid item height="fit-content" container>
|
<Grid item height="fit-content" container>
|
||||||
<Link href="/content/types">
|
<Link href="/content/types">
|
||||||
|
Loading…
Reference in New Issue
Block a user