diff --git a/app/api/calendar/route.ts b/app/api/calendar/route.ts index ca4df27..edc4190 100644 --- a/app/api/calendar/route.ts +++ b/app/api/calendar/route.ts @@ -1,4 +1,4 @@ -import { NextResponse } from "next/server"; +import { NextRequest, NextResponse } from "next/server"; import { getServerSession } from "next-auth/next"; import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { PrismaClient } from "@prisma/client"; diff --git a/app/api/calendars/route.ts b/app/api/calendars/route.ts index e0fd46d..39b55c8 100644 --- a/app/api/calendars/route.ts +++ b/app/api/calendars/route.ts @@ -1,6 +1,6 @@ import { NextRequest, NextResponse } from "next/server"; import { getServerSession } from "next-auth/next"; -import { authOptions } from "@/lib/auth"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { prisma } from "@/lib/prisma"; /** diff --git a/app/api/leantime/tasks/route.ts b/app/api/leantime/tasks/route.ts index fea2b82..337f1b7 100644 --- a/app/api/leantime/tasks/route.ts +++ b/app/api/leantime/tasks/route.ts @@ -1,6 +1,7 @@ import { NextRequest, NextResponse } from "next/server"; import { getServerSession } from "next-auth/next"; -import { authOptions } from "@/lib/auth"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; +import { prisma } from "@/lib/prisma"; interface Task { id: string; diff --git a/app/api/rocket-chat/messages/route.ts b/app/api/rocket-chat/messages/route.ts index 329466a..f809835 100644 --- a/app/api/rocket-chat/messages/route.ts +++ b/app/api/rocket-chat/messages/route.ts @@ -1,5 +1,5 @@ -import { getServerSession } from "next-auth"; -import { authOptions } from "@/lib/auth"; +import { getServerSession } from "next-auth/next"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { NextResponse } from "next/server"; // Helper function to get user token using admin credentials diff --git a/app/layout.tsx b/app/layout.tsx index d0f16cf..31b8427 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,9 +3,11 @@ import { Inter } from "next/font/google"; import "./globals.css"; import { headers } from "next/headers"; import { getServerSession } from "next-auth/next"; -import { authOptions } from "@/lib/auth"; +import { authOptions } from "@/app/api/auth/[...nextauth]/route"; import { Providers } from "@/components/providers"; import { LayoutWrapper } from "@/components/layout/layout-wrapper"; +import { SessionProvider } from "@/components/providers/session-provider"; +import { Toaster } from "@/components/ui/toaster"; const inter = Inter({ subsets: ["latin"] });