Fixed attachment field type (#4811)
updatedAt and deletedAt field changed to string like createdAt field. On file upload updatedAt field will be given date same as createdAt. Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This commit is contained in:
@ -46,6 +46,7 @@ export const useUploadAttachmentFile = () => {
|
|||||||
type: getFileType(file.name),
|
type: getFileType(file.name),
|
||||||
[targetableObjectFieldIdName]: targetableObject.id,
|
[targetableObjectFieldIdName]: targetableObject.id,
|
||||||
createdAt: new Date().toISOString(),
|
createdAt: new Date().toISOString(),
|
||||||
|
updatedAt: new Date().toISOString(),
|
||||||
} as Partial<Attachment>;
|
} as Partial<Attachment>;
|
||||||
|
|
||||||
await createOneAttachment(attachmentToCreate);
|
await createOneAttachment(attachmentToCreate);
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
export type Attachment = {
|
export type Attachment = {
|
||||||
id: string;
|
id: string;
|
||||||
createdAt: string;
|
createdAt: string;
|
||||||
updatedAt: Date;
|
updatedAt: string;
|
||||||
deletedAt: Date | null;
|
deletedAt: string | null;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user