User icon
@paradock pls ahlp. it doesnt return 25 posts when i get the html response

javascript
async function getExplorePagePosts() {
for (let i = 0; i < explorePagePosts.length; i++) {
var post = explorePagePosts[i]
html += await buildPost(post, timezone)
}
}
await getExplorePagePosts()
return new Response(html, {headers: {'Content-Type': 'text/html'}})
Comments
  • User icon
    you get no result? a few posts but missing a few? how are you getting your posts?
    • User icon
      all i see is that you're taking the api results (i think) and parse it into posts 🤔
    • User icon
      or maybe the api only outputs 10 results let me check (or there's no api)

      there is an api endpoint and it does output 25 results to me
    • User icon
      missing posts. I get like 12 posts all the time
    • User icon
      like when you request the api... you only get 12 posts in the output?
    • User icon
      The problem isn't with any of your API endpoints. They return 25 posts just fine for each response
    • User icon
      No, it has to deal with my code. I'm assuming it was a race condition which is why it returns the html early. This is the cloudflare code running the webpages