blob: 0a0b7d16e8ae6147b5dc3fa69eb785351246f4cc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
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
});
}
|