import { api } from '../../lib/api'; import { processThreadOut } from '../../lib/thread'; export async function post({ request }) { const form = await request.formData(); console.log(form); let t: Thread = await processThreadOut(form); await api('post', `thread/${form.get('board')}`, JSON.stringify(t)); return new Response(t.id, { status: 200 }); }