fixes to html

merge-requests/4/head
Matthew 2020-08-30 22:00:17 -04:00
parent f3297d79e6
commit 7d5b56d8cc
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 3 additions and 3 deletions

View File

@ -11,9 +11,9 @@
try {
const input = document.getElementsByClassName('form-control')[0];
const response = await fetch(`https://api.cloud.libraryofcode.org/verify?t=${input.value}`);
if (response.status === 200) alert('Request authorized. You may now close this tab.');
if (response.status === 401) alert('Authorization Token incorrect, try again.');
if (response.status >= 500) alert('INTERNAL SERVER ERROR');
if (response.status === 200) return alert('Request authorized. You may now close this tab.');
if (response.status === 401) return alert('Authorization Token incorrect, try again.');
if (response.status >= 500) return alert('INTERNAL SERVER ERROR');
alert('Authentication Complete.');
} catch (err) {
alert(err);