hyperpop.js/dummy.ts

16 lines
347 B
TypeScript
Raw Normal View History

2021-09-23 00:17:35 +00:00
import { HOST } from "./common.js";
export async function dummy(token: string) {
const res = await fetch(`${HOST}/api/Aperture/dummy`, {
method: "POST",
headers: {
accesstoken: token,
},
});
const json = await res.json();
if (!json.isOk) {
console.error(json);
throw new Error("Tango: error desconocido");
}
}