2024-04-27 16:22:35 -04:00

19 lines
345 B
TypeScript

"use server"
export async function createSandbox(body: {
type: string
name: string
userId: string
visibility: string
}) {
const res = await fetch("http://localhost:8787/api/sandbox", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
})
return await res.text()
}