diff --git a/src/app/api/search/route.ts b/src/app/api/search/route.ts index 34c8ee68e..84c9643c4 100644 --- a/src/app/api/search/route.ts +++ b/src/app/api/search/route.ts @@ -2,7 +2,7 @@ import { cache } from '@/db/Cache'; import db from '@/db'; import { CourseContent } from '@prisma/client'; import Fuse from 'fuse.js'; -import { NextResponse } from 'next/server'; +import { NextRequest, NextResponse } from 'next/server'; export type TSearchedVideos = { id: number; @@ -21,7 +21,7 @@ const fuzzySearch = (videos: TSearchedVideos[], searchQuery: string) => { return searchedVideos.map((video) => video.item); }; -export async function GET(request: Request) { +export async function GET(request: NextRequest) { const { searchParams } = new URL(request.url); const searchQuery = searchParams.get('q'); diff --git a/tsconfig.json b/tsconfig.json index 1f308869a..cec286f06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -16,14 +16,14 @@ "incremental": true, "plugins": [ { - "name": "next" - } + "name": "next", + }, ], "paths": { "@/*": ["./src/*"], - "@public/*": ["./public/*"] - } + "@public/*": ["./public/*"], + }, }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] + "exclude": ["node_modules"], }