-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
50 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
"use server"; | ||
|
||
import prisma from "@/app/lib/prisma"; | ||
import { NextRequest } from "next/server"; | ||
|
||
export async function GET() { | ||
const quotes = await prisma.quote.findMany({ | ||
orderBy: [ | ||
{ | ||
id: "asc", | ||
}, | ||
], | ||
}); | ||
return Response.json({ message: "success", data: quotes }, { status: 200 }); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
// import { type NextRequest } from "next/server"; | ||
// import { updateSession } from "@/app/utils/supabase/middleware"; | ||
import { type NextRequest } from "next/server"; | ||
import { updateSession } from "@/app/utils/supabase/middleware"; | ||
|
||
// export async function middleware(request: NextRequest) { | ||
// return await updateSession(request); | ||
// } | ||
export async function middleware(request: NextRequest) { | ||
return await updateSession(request); | ||
} | ||
|
||
// export const config = { | ||
// matcher: [ | ||
// /* | ||
// * Match all request paths except for the ones starting with: | ||
// * - _next/static (static files) | ||
// * - _next/image (image optimization files) | ||
// * - favicon.ico (favicon file) | ||
// * Feel free to modify this pattern to include more paths. | ||
// */ | ||
// "/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", | ||
// ], | ||
// }; | ||
export const config = { | ||
matcher: [ | ||
/* | ||
* Match all request paths except for the ones starting with: | ||
* - _next/static (static files) | ||
* - _next/image (image optimization files) | ||
* - favicon.ico (favicon file) | ||
* Feel free to modify this pattern to include more paths. | ||
*/ | ||
"/((?!_next/static|_next/image|favicon.ico|.*\\.(?:svg|png|jpg|jpeg|gif|webp)$).*)", | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters