Files
itsc-timetable/test.ts
2023-02-03 22:47:51 +08:00

16 lines
378 B
TypeScript

const json = await fetch("https://itsc.yongyuancv.cn/api/admin").then((resp) =>
resp.json()
);
const result = await fetch("http://localhost:3000/api/admin", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(json),
}).then(resp => resp.text())
console.log(result)
// set begin
await fetch('http://localhost:3000/api/begin')