This commit is contained in:
2025-06-05 21:20:59 +02:00
commit 988534ed01
26 changed files with 983 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import type { Actions } from '@sveltejs/kit';
const BACKEND_URL: string = 'http://127.0.0.1:3000' as const;
export const actions = {
'send-message': async ({request, fetch}) => {
const formData = await request.formData();
const response = await fetch(`${BACKEND_URL}/message`, {
method: 'POST',
body: formData,
});
console.log(response.status);
},
} satisfies Actions;