mirror of
https://github.com/hexastack/hexabot
synced 2025-04-03 12:52: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',
|
||||
},
|
||||
id: '',
|
||||
createdAt: null as unknown as Date,
|
||||
updatedAt: null as unknown as Date,
|
||||
createdAt: new Date(),
|
||||
updatedAt: new Date(),
|
||||
},
|
||||
]);
|
||||
|
||||
@ -267,7 +267,7 @@ describe('ContentController', () => {
|
||||
mockContentType.id,
|
||||
mockContentType,
|
||||
);
|
||||
expect(result).toEqual([
|
||||
expect(result).toEqualPayload([
|
||||
{
|
||||
entity: mockContentType.id,
|
||||
title: 'store 3',
|
||||
@ -276,8 +276,6 @@ describe('ContentController', () => {
|
||||
image: 'image.jpg',
|
||||
},
|
||||
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), {
|
||||
entity: EntityType.CONTENT_TYPE,
|
||||
});
|
||||
const { mutateAsync: importDataset, isLoading } = useImport(
|
||||
const { mutate: importDataset, isLoading } = useImport(
|
||||
EntityType.CONTENT,
|
||||
{
|
||||
onError: () => {
|
||||
@ -125,11 +125,11 @@ export const Contents = () => {
|
||||
},
|
||||
{ idTargetContentType: contentType?.id }
|
||||
);
|
||||
const handleImportChange = async (file: File) => {
|
||||
await importDataset(file);
|
||||
const handleImportChange = (file: File) => {
|
||||
importDataset(file);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
return (
|
||||
<Grid container flexDirection="column" gap={3}>
|
||||
<Grid item height="fit-content" container>
|
||||
<Link href="/content/types">
|
||||
|
Loading…
Reference in New Issue
Block a user