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:
Kanav Arora 2024-04-04 19:21:45 +05:30 committed by GitHub
parent 2e419091cc
commit 18072d2935
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -46,6 +46,7 @@ export const useUploadAttachmentFile = () => {
type: getFileType(file.name),
[targetableObjectFieldIdName]: targetableObject.id,
createdAt: new Date().toISOString(),
updatedAt: new Date().toISOString(),
} as Partial<Attachment>;
await createOneAttachment(attachmentToCreate);

View File

@ -1,6 +1,6 @@
export type Attachment = {
id: string;
createdAt: string;
updatedAt: Date;
deletedAt: Date | null;
updatedAt: string;
deletedAt: string | null;
};