diff --git a/apps/frontend/app/api/artifacts/route.ts b/apps/frontend/app/api/artifacts/route.ts deleted file mode 100644 index b78e568a6..000000000 --- a/apps/frontend/app/api/artifacts/route.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { notFound } from "next/navigation"; -import { NextResponse, type NextRequest } from "next/server"; -import { logger } from "../../../lib/logger"; -import { cachedGetAllArtifacts } from "../../../lib/graphql/cached-queries"; - -export const runtime = "edge"; // 'nodejs' (default) | 'edge' -//export const dynamic = "force-dynamic"; -export const revalidate = 0; - -/** - * This will return an array of all artifacts - * This is currently fetched by Algolia to build the search index - * @param _request - * @returns - */ -export async function GET(_request: NextRequest) { - // Get artifacts from database - const { artifacts: artifactArray } = await cachedGetAllArtifacts(); - if (!Array.isArray(artifactArray) || artifactArray.length < 1) { - logger.warn(`Cannot find artifacts`); - notFound(); - } - return NextResponse.json(artifactArray); -} diff --git a/apps/frontend/app/api/projects/route.ts b/apps/frontend/app/api/projects/route.ts deleted file mode 100644 index a071f932c..000000000 --- a/apps/frontend/app/api/projects/route.ts +++ /dev/null @@ -1,24 +0,0 @@ -import { notFound } from "next/navigation"; -import { NextResponse, type NextRequest } from "next/server"; -import { logger } from "../../../lib/logger"; -import { cachedGetAllProjects } from "../../../lib/graphql/cached-queries"; - -export const runtime = "edge"; // 'nodejs' (default) | 'edge' -//export const dynamic = "force-dynamic"; -export const revalidate = 0; - -/** - * This will return an array of all artifacts - * This is currently fetched by Algolia to build the search index - * @param _request - * @returns - */ -export async function GET(_request: NextRequest) { - // Get projects from database - const { projects: projectArray } = await cachedGetAllProjects(); - if (!Array.isArray(projectArray) || projectArray.length < 1) { - logger.warn(`Cannot find projects`); - notFound(); - } - return NextResponse.json(projectArray); -}