import type { APIRoute } from 'astro';
import { createJoinRequest } from '../../lib/db';

export const POST: APIRoute = ({ locals }) => {
  createJoinRequest(locals.user.id);
  return new Response(JSON.stringify({ ok: true }), {
    headers: { 'Content-Type': 'application/json' },
  });
};
