feat: Init

This commit is contained in:
beilunyang
2024-12-16 01:35:08 +08:00
commit cc7e5003c5
73 changed files with 15001 additions and 0 deletions

21
middleware.ts Normal file
View File

@@ -0,0 +1,21 @@
import { auth } from "@/lib/auth"
import { NextResponse } from "next/server"
export async function middleware() {
const session = await auth()
if (!session) {
return NextResponse.json(
{ error: "Unauthorized" },
{ status: 401 }
)
}
return NextResponse.next()
}
export const config = {
matcher: [
"/api/emails/:path*",
]
}