Skip to content

Commit

Permalink
Refactor postDatabaseEntry to include timestamp from diffData if avai…
Browse files Browse the repository at this point in the history
…lable
  • Loading branch information
Adammatthiesen committed Dec 11, 2024
1 parent 01b467b commit c4427ae
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ export const postDatabaseEntry: STUDIOCMS_SDK['POST']['databaseEntry'] = {
userId: diffData.userId,
pageId: diffData.pageId,
diff: diffData.diff || '',
timestamp: new Date(),
timestamp: diffData.timestamp || new Date(),
pageContentStart: diffData.pageContentStart,
pageMetaData: JSON.stringify(diffData.pageMetaData as string),
pageMetaData: JSON.stringify(diffData.pageMetaData || {}),
})
.returning();
},
Expand Down

0 comments on commit c4427ae

Please sign in to comment.