diff --git a/src/trello.js b/src/trello.js index bd671b5..cd8e6f9 100644 --- a/src/trello.js +++ b/src/trello.js @@ -9,10 +9,7 @@ let cache; async function getTrelloCache() { const available = await trelloAPIAvailable(); if (!available) { - return { - update_time: Date.now(), - sections: [] - }; + return cache; } if (!cache) { @@ -79,7 +76,7 @@ async function updateTrelloCache() { async function trelloAPIAvailable() { const { status } = await got('https://trello.status.atlassian.com/api/v2/status.json').json(); - return status.description === 'All Systems Operational'; + return status.indicator !== 'major' && status.indicator !== 'critical'; } module.exports = {