import type { RequestHandler } from '@sveltejs/kit';
import { getSteamIdFromCookies } from '$lib/server/steam';

export const GET: RequestHandler = async ({ cookies }) => {
  const steamId = getSteamIdFromCookies(cookies);
  return new Response(
    JSON.stringify({ connected: Boolean(steamId), steamId }),
    { headers: { 'content-type': 'application/json' } }
  );
};


