export const POST = async ({ request, locals }: RequestEvent) =>
withApiAuth({ user: locals.user }, async () => {
const data = await request.formData();
const title = data.get('title') as string;
supabaseServerClient(request).from('projects').insert([{ title }]);
return {
body: { user: locals.user }
};
});
export const POST = async ({ request, locals }: RequestEvent) =>
withApiAuth({ user: locals.user }, async () => {
const data = await request.formData();
const title = data.get('title') as string;
supabaseServerClient(request).from('projects').insert([{ title }]);
return {
body: { user: locals.user }
};
});