diff --git a/api/hooks/lib/utils.js b/api/hooks/lib/utils.js index 8af433a..c5cc25f 100644 --- a/api/hooks/lib/utils.js +++ b/api/hooks/lib/utils.js @@ -115,10 +115,10 @@ function run(url) { let dbObject = { cruxMetrics, lighthouseMetrics, - performance: lighthouse.categories.performance.score * 100, - accessibility: lighthouse.categories.accessibility.score * 100, - bestPractices: lighthouse.categories["best-practices"].score * 100, - seo: lighthouse.categories.seo.score * 100, + performance: Math.round(lighthouse.categories.performance.score * 100), + accessibility: Math.round(lighthouse.categories.accessibility.score * 100), + bestPractices: Math.round(lighthouse.categories["best-practices"].score * 100), + seo: Math.round(lighthouse.categories.seo.score * 100), } return dbObject } diff --git a/api/hooks/lighthouse/post_create.js b/api/hooks/lighthouse/post_create.js index e3f1038..4855200 100644 --- a/api/hooks/lighthouse/post_create.js +++ b/api/hooks/lighthouse/post_create.js @@ -7,7 +7,6 @@ var { setUpQuery, calculateAverageDynamically, run } = require("../lib/utils") } let dbObjs = [] urls.forEach((url) => { - console.log("URL:", url) dbObjs.push(run(url)) }) let dbObject = calculateAverageDynamically(dbObjs)