Signed-off-by: Marcus Noble <github@marcusnoble.co.uk>
This commit is contained in:
Marcus Noble 2024-01-26 14:07:51 +00:00
parent 6e1d5a472e
commit a6d18f90bb
Signed by: AverageMarcus
GPG Key ID: B8F2DB8A7AEBAF78

View File

@ -9,7 +9,7 @@ const rawResults = document.querySelector("#rawResults");
function find() { function find() {
let user = gh.value.toLowerCase(); let user = gh.value.toLowerCase();
if (user != "") { if (user != "") {
statusUpdate(`Fetching devstat score for '${user}'`, "info"); statusUpdate(`Fetching devstats score for '${user}'`, "info");
rawResultsWrapper.classList.add('hidden'); rawResultsWrapper.classList.add('hidden');
fetch("https://devstats.cncf.io/api/v1", { fetch("https://devstats.cncf.io/api/v1", {
method: "POST", method: "POST",
@ -30,11 +30,11 @@ function find() {
rawResults.innerText = JSON.stringify(data, "", 2) rawResults.innerText = JSON.stringify(data, "", 2)
rawResultsWrapper.classList.remove('hidden'); rawResultsWrapper.classList.remove('hidden');
} else { } else {
statusUpdate(`Failed to get devstat score for '${user}'`, "error"); statusUpdate(`Failed to get devstats score for '${user}'`, "error");
} }
}) })
.catch(err => { .catch(err => {
statusUpdate(`Failed to get devstat score for '${user}'`, "error"); statusUpdate(`Failed to get devstats score for '${user}'`, "error");
console.log(err); console.log(err);
}); });
} }