forked from engineering/cloudservices
fixes to html
parent
f3297d79e6
commit
7d5b56d8cc
|
@ -11,9 +11,9 @@
|
||||||
try {
|
try {
|
||||||
const input = document.getElementsByClassName('form-control')[0];
|
const input = document.getElementsByClassName('form-control')[0];
|
||||||
const response = await fetch(`https://api.cloud.libraryofcode.org/verify?t=${input.value}`);
|
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 === 200) return alert('Request authorized. You may now close this tab.');
|
||||||
if (response.status === 401) alert('Authorization Token incorrect, try again.');
|
if (response.status === 401) return alert('Authorization Token incorrect, try again.');
|
||||||
if (response.status >= 500) alert('INTERNAL SERVER ERROR');
|
if (response.status >= 500) return alert('INTERNAL SERVER ERROR');
|
||||||
alert('Authentication Complete.');
|
alert('Authentication Complete.');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
alert(err);
|
alert(err);
|
||||||
|
|
Loading…
Reference in New Issue