This commit is contained in:
2025-08-07 08:47:11 +09:00
parent 644ba912b1
commit d20f630e1b
5 changed files with 29 additions and 7 deletions
+5 -1
View File
@@ -57,6 +57,10 @@ document.getElementById("ueuse").addEventListener("click", async () => {
});
document.getElementById("api").addEventListener("click", async () => {
const token = await (fetch("/actions/token", {
method: "GET",
})).text();
const endpoint = prompt("エンドポイント", "/serverinfo-api").toLowerCase();
if (endpoint === "") {
@@ -64,7 +68,7 @@ document.getElementById("api").addEventListener("click", async () => {
return;
}
const body = prompt("body(JSON)", `{"key": "value"}`).toLowerCase();
const body = prompt("body(JSON)", `{"token": ${token}}`).toLowerCase();
if (body === "") {
alert("bodyが設定されていません。");