mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-30 00:55:00 +08:00
Specifying a 401 status code to show API Key
This commit is contained in:
parent
101e050746
commit
22108f9f90
@ -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');
|
||||||
|
Loading…
Reference in New Issue
Block a user