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
@@ -179,7 +179,7 @@ export class ServerlessFunctionV2Service {
|
||||
|
||||
const optimisticallyUpdatedFlatServerlessFunctionWithDeletedAt = {
|
||||
...existingFlatServerlessFunction,
|
||||
deletedAt: new Date(),
|
||||
deletedAt: new Date().toISOString(),
|
||||
};
|
||||
|
||||
const validateAndBuildResult =
|
||||
|
||||
+2
-2
@@ -38,8 +38,8 @@ export const fromCreateServerlessFunctionInputToFlatServerlessFunction = ({
|
||||
rawCreateServerlessFunctionInput.handlerName ?? DEFAULT_HANDLER_NAME,
|
||||
universalIdentifier:
|
||||
rawCreateServerlessFunctionInput.universalIdentifier ?? id,
|
||||
createdAt: currentDate,
|
||||
updatedAt: currentDate,
|
||||
createdAt: currentDate.toISOString(),
|
||||
updatedAt: currentDate.toISOString(),
|
||||
deletedAt: null,
|
||||
latestVersion: null,
|
||||
publishedVersions: [],
|
||||
|
||||
+3
@@ -19,6 +19,9 @@ export const fromServerlessFunctionEntityToFlatServerlessFunction = (
|
||||
|
||||
return {
|
||||
...serverlessFunctionWithoutRelations,
|
||||
createdAt: serverlessFunctionEntity.createdAt.toISOString(),
|
||||
updatedAt: serverlessFunctionEntity.updatedAt.toISOString(),
|
||||
deletedAt: serverlessFunctionEntity.deletedAt?.toISOString() ?? null,
|
||||
cronTriggerIds:
|
||||
serverlessFunctionEntity.cronTriggers.map((el) => el.id) ?? [],
|
||||
routeTriggerIds:
|
||||
|
||||
Reference in New Issue
Block a user