diff --git a/api/app.js b/api/app.js index 6fea014..c0663f5 100644 --- a/api/app.js +++ b/api/app.js @@ -177,7 +177,7 @@ function predictSpeed(goalDate, goalNumber, currentNumber) { let daysRemaining if (timeRemaining >= 0) { daysRemaining = Math.ceil(timeRemaining / (1000 * 60 * 60 * 24)); - else { + } else { daysRemaining = math.floor(timeRemaining / (1000 * 60 * 60 * 24)); } let neededSpeed = (goalNumber - currentNumber) / Math.abs(daysRemaining); @@ -243,4 +243,4 @@ app.event('app_mention', async (body) => { } catch (error) { console.error(error); } -})(); \ No newline at end of file +})();