fix worker + start create modal with logic
This commit is contained in:
15
frontend/lib/actions.ts
Normal file
15
frontend/lib/actions.ts
Normal file
@ -0,0 +1,15 @@
|
||||
"use server"
|
||||
|
||||
export async function createSandbox(body: {
|
||||
type: string
|
||||
name: string
|
||||
visibility: string
|
||||
}) {
|
||||
const res = await fetch("http://localhost:8787/api/sandbox/create", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user