Files
noticeUwuzu/panel/route/weather.ts
T
2025-11-30 17:44:44 +09:00

26 lines
519 B
TypeScript

import express from "express";
const WeatherUeuse = express.Router();
import { weatherNotice } from "@/scripts/weatherNotice";
WeatherUeuse.post("/actions/weather", (req, res) => {
try {
(async () => {
await weatherNotice();
})();
res.status(202)
.send("Accepted");
} catch(err) {
res.status(500)
.send(`Error: ${err}`);
}
});
WeatherUeuse.get("/actions/weather", (req, res) => {
res.status(501)
.send("POST Only");
});
export default WeatherUeuse;