From 15ff3bd393f41b5f71519ec638f1cc701d5cb995 Mon Sep 17 00:00:00 2001 From: Pigges Date: Sun, 20 Apr 2025 20:52:57 +0200 Subject: [PATCH] fix --- app/helpers/github.js | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/app/helpers/github.js b/app/helpers/github.js index 9b935fc..8ba7c44 100644 --- a/app/helpers/github.js +++ b/app/helpers/github.js @@ -15,9 +15,7 @@ let lastGithubFeedUpdate; updateGithubFeed(); // Update the feed every 5 minutes -setInterval(async () => { - githubFeed = await updateGithubFeed(); -}, 5 * 60 * 1000); +setInterval(() => { updateGithubFeed(); }, 5 * 60 * 1000); // P R O G R A M @@ -315,21 +313,18 @@ async function updateGithubFeed() { let response; try { - lastGithubFeedUpdate = new Date(); - response = await fetch(`https://api.github.com/orgs/lbryfoundation/events`, process.env.GITHUB_TOKEN && { headers: { 'Authorization': `Bearer ${process.env.GITHUB_TOKEN}` } }); - } catch (err) { console.log(err); - return; } - + githubFeed = await response.json(); + lastGithubFeedUpdate = new Date(); }