Public
Script
1
2
3
4
5
6
7
8
9
10
11
12
13
export async function create({ code, token }: { code: string; token: string }) {
const { error, details, url } = await (await fetch("https://websandbox-createAPI.web.val.run", {
body: JSON.stringify({ code, token }),
method: "POST",
})).json();
if (error) {
const e = new Error(error);
if (details) {
(e as any).details = details;
}
}
return url;
}
Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
Nobody has commented on this val yet: be the first!
March 9, 2024