From 7d5b56d8cced7913d9756d5cb89c4b27587f225b Mon Sep 17 00:00:00 2001 From: Matthew R Date: Sun, 30 Aug 2020 22:00:17 -0400 Subject: [PATCH] fixes to html --- src/api/static/verify.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/api/static/verify.html b/src/api/static/verify.html index d13b168..ac819cd 100644 --- a/src/api/static/verify.html +++ b/src/api/static/verify.html @@ -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);