Somewhat automate types and stuff.

This commit is contained in:
2025-05-14 12:59:00 -05:00
parent 68ba7cc41f
commit 0cf1049ec6
23 changed files with 595 additions and 64 deletions

View File

@ -1,5 +1,6 @@
import { createServerClient } from '@supabase/ssr';
import { type NextRequest, NextResponse } from 'next/server';
import type { Database } from '@/utils/supabase/types';
export const updateSession = async (request: NextRequest) => {
// This `try/catch` block is only here for the interactive tutorial.
@ -12,7 +13,7 @@ export const updateSession = async (request: NextRequest) => {
},
});
const supabase = createServerClient(
const supabase = createServerClient<Database>(
process.env.NEXT_PUBLIC_SUPABASE_URL!,
process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
{