From 8e4163e3f08e29f38fe87c59d8cfb91e0fa98063 Mon Sep 17 00:00:00 2001 From: kartofen Date: Mon, 29 Aug 2022 19:01:20 +0300 Subject: everything works --- src/pages/create/thread.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pages/create/thread.ts') diff --git a/src/pages/create/thread.ts b/src/pages/create/thread.ts index 0a0b7d1..b3a02be 100644 --- a/src/pages/create/thread.ts +++ b/src/pages/create/thread.ts @@ -1,13 +1,14 @@ import { api } from '../../lib/api'; import { processThreadOut } from '../../lib/thread'; +import Thread from '../../models/Thread'; export async function post({ request }) { const form = await request.formData(); - console.log(form); - let t: Thread = await processThreadOut(form); + console.log(t); + await api('post', `thread/${form.get('board')}`, JSON.stringify(t)); return new Response(t.id, { -- cgit v1.2.3