style: lf
parent
313dc6969a
commit
a8236e89cf
|
|
@ -1,20 +1,20 @@
|
||||||
import { USERAGENT } from "../constant.ts";
|
import { USERAGENT } from "../constant.ts";
|
||||||
|
|
||||||
const [key, ...uuids] = Deno.args;
|
const [key, ...uuids] = Deno.args;
|
||||||
if (!key || uuids.length === 0) {
|
if (!key || uuids.length === 0) {
|
||||||
console.log("Usage: delete.ts <key> <uuid> <uuid...>");
|
console.log("Usage: delete.ts <key> <uuid> <uuid...>");
|
||||||
Deno.exit(1);
|
Deno.exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const uuid of uuids) {
|
for (const uuid of uuids) {
|
||||||
console.log("Deleting", uuid);
|
console.log("Deleting", uuid);
|
||||||
const resp = await fetch(`https://stat.ink/api/v3/battle/${uuid}`, {
|
const resp = await fetch(`https://stat.ink/api/v3/battle/${uuid}`, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
headers: {
|
headers: {
|
||||||
"Authorization": `Bearer ${key}`,
|
"Authorization": `Bearer ${key}`,
|
||||||
"User-Agent": USERAGENT,
|
"User-Agent": USERAGENT,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(resp.status);
|
console.log(resp.status);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue