fixed build performance issues; optimized queries

This commit is contained in:
2025-03-15 20:31:38 +01:00
parent cff9dad54c
commit 324451e082
27 changed files with 289 additions and 208 deletions
+2 -2
View File
@@ -10,8 +10,8 @@ import { Button } from "@/components/ui/button";
import Link from "next/link";
export default async function Home() {
const categories = await api.category.getAll({ limit: 6 });
const articles = await api.article.getAll({ limit: 6 });
const categories = await api.category.getMany({ limit: 6 });
const articles = await api.article.getMany({ limit: 6 });
return (
<>
<Alert>
+1 -2
View File
@@ -1,8 +1,7 @@
import * as cheerio from "cheerio";
import { NextApiRequest } from "next";
import { NextResponse } from "next/server";
export async function GET(req: NextApiRequest) {
export async function GET(req: Request) {
if (req.method !== "GET") {
return NextResponse.json({ error: "Method not allowed" });
}