Specifying a 401 status code to show API Key

This commit is contained in:
Paul Sanders 2021-02-25 01:07:18 -05:00
parent 101e050746
commit 22108f9f90

View File

@ -174,7 +174,7 @@
xmlHttp.onload = function () { xmlHttp.onload = function () {
let apiKeyContainer = document.getElementById('apiKeyContainer'); let apiKeyContainer = document.getElementById('apiKeyContainer');
if (xmlHttp.status !== 200) { if (xmlHttp.status === 401) {
document.getElementById('apiKey').remove(); document.getElementById('apiKey').remove();
let inputNode = document.createElement('input'); let inputNode = document.createElement('input');
inputNode.setAttribute('id', 'apiKey'); inputNode.setAttribute('id', 'apiKey');