diff --git a/src/lib/supabase/middleware.ts b/src/lib/supabase/middleware.ts index a0bbaf3..b689d45 100644 --- a/src/lib/supabase/middleware.ts +++ b/src/lib/supabase/middleware.ts @@ -38,16 +38,14 @@ export async function updateSession(request: NextRequest) { const { data: { user }, - } = await supabase.auth.getUser() + } = await supabase.auth.getUser(); if ( - !user && - request.nextUrl.pathname.startsWith('/solicitudes/editar') || - !user && - request.nextUrl.pathname.startsWith('/ofertas/editar') + (!user && request.nextUrl.pathname.startsWith('/solicitudes/editar')) || + (!user && request.nextUrl.pathname.startsWith('/ofertas/editar')) ) { - url.pathname = '/auth' - return NextResponse.redirect(url) + url.pathname = '/auth'; + return NextResponse.redirect(url); } // IMPORTANT: You *must* return the supabaseResponse object as it is. If you're // creating a new response object with NextResponse.next() make sure to: