feat: profile page & webhook notification

This commit is contained in:
beilunyang
2024-12-17 13:26:34 +08:00
parent e0bd04818e
commit c69947ceae
20 changed files with 1533 additions and 288 deletions

View File

@@ -4,7 +4,7 @@ import { NextResponse } from "next/server"
export async function middleware() {
const session = await auth()
if (!session) {
if (!session?.user) {
return NextResponse.json(
{ error: "Unauthorized" },
{ status: 401 }
@@ -17,5 +17,6 @@ export async function middleware() {
export const config = {
matcher: [
"/api/emails/:path*",
"/api/webhook/:path*",
]
}