16 lines
378 B
TypeScript
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') |