Somewhat automate types and stuff.
This commit is contained in:
@ -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!,
|
||||
{
|
||||
|
Reference in New Issue
Block a user