mirror of
https://github.com/beilunyang/moemail.git
synced 2025-10-04 23:22:45 +08:00
feat: profile page & webhook notification
This commit is contained in:
@@ -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*",
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user