Fix flat entity maps date serialization (#16420)
Changes: - as we store date in redis as serialized, let's make all flatEntity dates as string. This requires changing FlatEntity types and making sure that entity are converted to flatEntity and flatEntity to dtos
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ export const computeFlatViewGroupsOnViewCreate = ({
|
||||
);
|
||||
}
|
||||
|
||||
const createdAt = new Date();
|
||||
const createdAt = new Date().toISOString();
|
||||
|
||||
const flatViewGroupsFromOptions: FlatViewGroup[] = (
|
||||
mainGroupByFieldMetadata.options ?? []
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ export const fromCreateViewGroupInputToFlatViewGroupToCreate = ({
|
||||
['fieldValue', 'id', 'viewId'],
|
||||
);
|
||||
|
||||
const createdAt = new Date();
|
||||
const createdAt = new Date().toISOString();
|
||||
const viewGroupId = createViewGroupInput.id ?? v4();
|
||||
|
||||
return {
|
||||
|
||||
+1
-1
@@ -35,6 +35,6 @@ export const fromDeleteViewGroupInputToFlatViewGroupOrThrow = ({
|
||||
|
||||
return {
|
||||
...existingFlatViewGroupToDelete,
|
||||
deletedAt: new Date(),
|
||||
deletedAt: new Date().toISOString(),
|
||||
};
|
||||
};
|
||||
|
||||
+3
@@ -14,6 +14,9 @@ export const fromViewGroupEntityToFlatViewGroup = (
|
||||
|
||||
return {
|
||||
...viewGroupEntityWithoutRelations,
|
||||
createdAt: viewGroupEntity.createdAt.toISOString(),
|
||||
updatedAt: viewGroupEntity.updatedAt.toISOString(),
|
||||
deletedAt: viewGroupEntity.deletedAt?.toISOString() ?? null,
|
||||
universalIdentifier:
|
||||
viewGroupEntityWithoutRelations.universalIdentifier ??
|
||||
viewGroupEntityWithoutRelations.id,
|
||||
|
||||
Reference in New Issue
Block a user