13 lines
372 B
TypeScript
13 lines
372 B
TypeScript
export const runtime = "nodejs";
|
|
|
|
import { NextResponse } from "next/server";
|
|
import { requireSession } from "@/lib/auth/require";
|
|
import { getConnectionStatus } from "@/lib/google/calendar";
|
|
|
|
export async function GET() {
|
|
const { session, response } = await requireSession();
|
|
if (!session) return response;
|
|
|
|
return NextResponse.json(await getConnectionStatus());
|
|
}
|