make sure date later than now will now be publish

This commit is contained in:
polv committed 2020-12-18 16:32:43 +07:00
1 parent 9ea60c68c7
commit d8161be401
47 files changed
+25 -11589

No files matched your search

+1 -1
View File
@@ -29,7 +29,7 @@ export const getStaticPaths: GetStaticPaths = async () => {
paths: Array(
Math.ceil(
dbPost.find({
date: { $exists: true } as any
date: { $lt: new Date().getTime() }
}).length / 5
) - 1
)