prettier fix

This commit is contained in:
Danel Kungla
2025-09-19 17:22:36 +03:00
parent efa94b3322
commit 0c2cfe6d18
509 changed files with 17988 additions and 9920 deletions

View File

@@ -1,5 +1,6 @@
import { createServerClient } from "@supabase/ssr";
import { type NextRequest, NextResponse } from "next/server";
import { type NextRequest, NextResponse } from 'next/server';
import { createServerClient } from '@supabase/ssr';
export const updateSession = async (request: NextRequest) => {
// This `try/catch` block is only here for the interactive tutorial.
@@ -40,12 +41,12 @@ export const updateSession = async (request: NextRequest) => {
const user = await supabase.auth.getUser();
// protected routes
if (request.nextUrl.pathname.startsWith("/protected") && user.error) {
return NextResponse.redirect(new URL("/sign-in", request.url));
if (request.nextUrl.pathname.startsWith('/protected') && user.error) {
return NextResponse.redirect(new URL('/sign-in', request.url));
}
if (request.nextUrl.pathname === "/" && !user.error) {
return NextResponse.redirect(new URL("/protected", request.url));
if (request.nextUrl.pathname === '/' && !user.error) {
return NextResponse.redirect(new URL('/protected', request.url));
}
return response;