From 2b53b8cd3dac346c2e3a25ab1574c605d6494d8e Mon Sep 17 00:00:00 2001 From: Last2014 Date: Thu, 7 Aug 2025 08:56:49 +0900 Subject: [PATCH] v8.0.2 --- package.json | 4 ++-- panel/public/script.js | 6 +++--- panel/route/token.ts | 2 +- panel/route/weather.ts | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index a6f549d..cec7ed2 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "notice-uwuzu", - "version": "v8.0.1@uwuzu1.6.1", - "tag": "v8.0.1", + "version": "v8.0.2@uwuzu1.6.1", + "tag": "v8.0.2", "description": "Notice Bot for uwuzu", "main": "dist/main.js", "scripts": { diff --git a/panel/public/script.js b/panel/public/script.js index c3ad1e2..d0446cf 100644 --- a/panel/public/script.js +++ b/panel/public/script.js @@ -13,7 +13,7 @@ document.getElementById("commandExec").addEventListener("click", async () => { }); document.getElementById("weatherUeuse").addEventListener("click", async () => { - const req = await fetch("/actions/weatherUeuse", { + const req = await fetch("/actions/weather", { method: "POST", }); @@ -57,7 +57,7 @@ document.getElementById("ueuse").addEventListener("click", async () => { }); document.getElementById("api").addEventListener("click", async () => { - const token = await (fetch("/actions/token", { + const token = await (await fetch("/actions/token", { method: "GET", })).text(); @@ -68,7 +68,7 @@ document.getElementById("api").addEventListener("click", async () => { return; } - const body = prompt("body(JSON)", `{"token": ${token}}`).toLowerCase(); + const body = prompt("body(JSON)", `{"token": "${token}"}`).toLowerCase(); if (body === "") { alert("bodyが設定されていません。"); diff --git a/panel/route/token.ts b/panel/route/token.ts index 9fb92f4..2563718 100644 --- a/panel/route/token.ts +++ b/panel/route/token.ts @@ -6,7 +6,7 @@ import config from "../../config.js"; Token.use(express.json()); Token.use(express.urlencoded({ extended: true })); -Token.post("/actions/token", async (req, res, next) => { +Token.post("/actions/token", (req, res, next) => { res.status(501) .send("GET Only"); }); diff --git a/panel/route/weather.ts b/panel/route/weather.ts index 36cc4a2..a62bd22 100644 --- a/panel/route/weather.ts +++ b/panel/route/weather.ts @@ -3,7 +3,7 @@ const WeatherUeuse = express.Router(); import { weatherNotice } from "../../scripts/weatherNotice.js"; -WeatherUeuse.post("/actions/command-execute", (req, res) => { +WeatherUeuse.post("/actions/weather", (req, res) => { try { (async () => { await weatherNotice(); @@ -17,7 +17,7 @@ WeatherUeuse.post("/actions/command-execute", (req, res) => { } }); -WeatherUeuse.get("/actions/command-execute", (req, res) => { +WeatherUeuse.get("/actions/weather", (req, res) => { res.status(501) .send("POST Only"); });