Merge pull request #1632 from KazooTTT/fix-algolia

Fix algolia
This commit is contained in:
tangly1024
2023-11-20 17:32:48 +08:00
committed by GitHub
2 changed files with 68 additions and 37 deletions

View File

@@ -42,7 +42,7 @@ const uploadDataToAlgolia = async(post) => {
if (!existed || !existed?.lastEditedDate || !existed?.lastIndexDate) {
needUpdateIndex = true
} else {
const lastEditedDate = new Date(existed.lastEditedDate)
const lastEditedDate = new Date(post.lastEditedDate)
const lastIndexDate = new Date(existed.lastIndexDate)
if (lastEditedDate.getTime() > lastIndexDate.getTime()) {
needUpdateIndex = true