1
1
mirror of https://github.com/Burn-E99/TheArtificer.git synced 2026-01-06 12:27:53 -05:00

Patch to API Tools Website

Some code was out of order, fixed now.
This commit is contained in:
Ean Milligan (Bastion)
2021-02-13 01:31:26 -05:00
parent d30d43b2ee
commit dc06bc35df

View File

@ -122,10 +122,6 @@ function sendPayload() {
var method;
var path = "/api/";
if (endpoint !== "generate") {
xhr.setRequestHeader("X-Api-Key", apiField.value);
}
switch (endpoint) {
case "generate":
method = "GET";
@ -152,6 +148,11 @@ function sendPayload() {
}
xhr.open(method, path);
if (endpoint !== "generate") {
xhr.setRequestHeader("X-Api-Key", apiField.value);
}
xhr.send();
xhr.onload = function() {