This commit is contained in:
Last2014 2025-08-07 08:56:49 +09:00
parent d20f630e1b
commit 2b53b8cd3d
4 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "notice-uwuzu", "name": "notice-uwuzu",
"version": "v8.0.1@uwuzu1.6.1", "version": "v8.0.2@uwuzu1.6.1",
"tag": "v8.0.1", "tag": "v8.0.2",
"description": "Notice Bot for uwuzu", "description": "Notice Bot for uwuzu",
"main": "dist/main.js", "main": "dist/main.js",
"scripts": { "scripts": {

View File

@ -13,7 +13,7 @@ document.getElementById("commandExec").addEventListener("click", async () => {
}); });
document.getElementById("weatherUeuse").addEventListener("click", async () => { document.getElementById("weatherUeuse").addEventListener("click", async () => {
const req = await fetch("/actions/weatherUeuse", { const req = await fetch("/actions/weather", {
method: "POST", method: "POST",
}); });
@ -57,7 +57,7 @@ document.getElementById("ueuse").addEventListener("click", async () => {
}); });
document.getElementById("api").addEventListener("click", async () => { document.getElementById("api").addEventListener("click", async () => {
const token = await (fetch("/actions/token", { const token = await (await fetch("/actions/token", {
method: "GET", method: "GET",
})).text(); })).text();
@ -68,7 +68,7 @@ document.getElementById("api").addEventListener("click", async () => {
return; return;
} }
const body = prompt("body(JSON)", `{"token": ${token}}`).toLowerCase(); const body = prompt("body(JSON)", `{"token": "${token}"}`).toLowerCase();
if (body === "") { if (body === "") {
alert("bodyが設定されていません。"); alert("bodyが設定されていません。");

View File

@ -6,7 +6,7 @@ import config from "../../config.js";
Token.use(express.json()); Token.use(express.json());
Token.use(express.urlencoded({ extended: true })); Token.use(express.urlencoded({ extended: true }));
Token.post("/actions/token", async (req, res, next) => { Token.post("/actions/token", (req, res, next) => {
res.status(501) res.status(501)
.send("GET Only"); .send("GET Only");
}); });

View File

@ -3,7 +3,7 @@ const WeatherUeuse = express.Router();
import { weatherNotice } from "../../scripts/weatherNotice.js"; import { weatherNotice } from "../../scripts/weatherNotice.js";
WeatherUeuse.post("/actions/command-execute", (req, res) => { WeatherUeuse.post("/actions/weather", (req, res) => {
try { try {
(async () => { (async () => {
await weatherNotice(); 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) res.status(501)
.send("POST Only"); .send("POST Only");
}); });