Skip to content

Commit

Permalink
Merge pull request #179 from pedrolivaresanchez/fix/prettier-code-format
Browse files Browse the repository at this point in the history
fix: code quality checks
  • Loading branch information
patrickwebsdev authored Nov 9, 2024
2 parents 05b3c94 + 7d704fd commit 32cac7a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/lib/supabase/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 32cac7a

Please sign in to comment.