Skip to content

Commit

Permalink
fix(api-headless-cms-ddb-es): compress latest data on publish (#2889)
Browse files Browse the repository at this point in the history
  • Loading branch information
brunozoric authored and Pavel910 committed Dec 22, 2022
1 parent c09d420 commit 9b80237
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1050,13 +1050,13 @@ export const createEntriesStorageOperations = (
index,
PK: createPartitionKey(latestEsEntryDataDecompressed),
SK: createLatestSortKey(),
data: {
data: await getESLatestEntryData(plugins, {
...latestEsEntryDataDecompressed,
status: CONTENT_ENTRY_STATUS.PUBLISHED,
locked: true,
savedOn: entry.savedOn,
publishedOn: entry.publishedOn
}
})
})
);
}
Expand All @@ -1070,13 +1070,13 @@ export const createEntriesStorageOperations = (
/**
* Update the published revision entry in ES.
*/
const esLatestData = await getESPublishedEntryData(plugins, preparedEntryData);
const esPublishedData = await getESPublishedEntryData(plugins, preparedEntryData);

esItems.push(
esEntity.putBatch({
...publishedKeys,
index,
data: esLatestData
data: esPublishedData
})
);

Expand Down

0 comments on commit 9b80237

Please sign in to comment.