fix: pages total

This commit is contained in:
DIYgod
2022-11-18 17:40:16 +00:00
parent 9a9a8d15cd
commit 0212a1047d
+2 -1
View File
@@ -274,10 +274,11 @@ export async function getPagesBySite(
)
break
}
const allLength = pages.list.length
pages.list = pages.list.filter(
(page) => page.date_published !== new Date("9999-01-01").toISOString(),
)
pages.total = pages.total - ((input.take || 10) - pages.list.length)
pages.total = pages.total - (allLength - pages.list.length)
await Promise.all(
pages?.list.map(async (page) => {