VideoChain-UI / src /server /actions.ts
jbilcke-hf's picture
jbilcke-hf HF staff
ready for release (sort of)
43dd1ac
raw
history blame
397 Bytes
"use server"
import { revalidatePath } from "next/cache"
import { submitNewTask } from "."
export async function formSubmit(formData: FormData) {
await submitNewTask({
prompt: `${formData.get("prompt") || ""}`,
ownerId: `${formData.get("ownerId") || ""}`,
})
// for doc see https://nextjs.org/docs/app/building-your-application/data-fetching/server-actions
revalidatePath('/')
}