upgrade to next.js 15

This commit is contained in:
Ramnique Singh 2025-06-24 12:07:30 +05:30
parent 8096eaf63b
commit 3b72de5df4
61 changed files with 5344 additions and 11135 deletions

View file

@ -3,10 +3,8 @@ import { chatsCollection } from "../../../../../../lib/mongodb";
import { ObjectId } from "mongodb";
import { authCheck } from "../../../utils";
export async function POST(
request: NextRequest,
{ params }: { params: { chatId: string } }
): Promise<Response> {
export async function POST(request: NextRequest, props: { params: Promise<{ chatId: string }> }): Promise<Response> {
const params = await props.params;
return await authCheck(request, async (session) => {
const { chatId } = params;

View file

@ -6,10 +6,8 @@ import { Filter, ObjectId } from "mongodb";
import { authCheck } from "../../../utils";
// list messages
export async function GET(
req: NextRequest,
{ params }: { params: { chatId: string } }
): Promise<Response> {
export async function GET(req: NextRequest, props: { params: Promise<{ chatId: string }> }): Promise<Response> {
const params = await props.params;
return await authCheck(req, async (session) => {
const { chatId } = params;