Revert "Don't wait for stars update"
All checks were successful
Deploy / build-and-publish (push) Successful in 1m24s
Deploy / deploy (push) Successful in 11s

This reverts commit 17bef7f18c.
This commit is contained in:
2024-09-30 02:52:31 +03:00
parent 17bef7f18c
commit d14efb7aae
3 changed files with 19 additions and 115 deletions

View File

@@ -6,7 +6,7 @@ const CACHE_LIFE = 1000 * 60 * 5
let lastRequest = Date.now()
let starCount: number | null = null
async function updateStars() {
export const load: PageServerLoad = async () => {
const now = Date.now()
if (now - CACHE_LIFE > lastRequest || starCount === null) {
@@ -17,10 +17,6 @@ async function updateStars() {
console.log(error)
}
}
}
export const load: PageServerLoad = () => {
updateStars()
return {
starCount,