This commit is contained in:
@@ -4,7 +4,7 @@ import prisma from "@/lib/prisma";
|
||||
export async function GET(req: Request) {
|
||||
const { searchParams } = new URL(req.url);
|
||||
const category = searchParams.get("category"); // slug or id
|
||||
const where: any = {};
|
||||
const where: any = { status: "active" };
|
||||
if (category) {
|
||||
if (category.length === 25 || category.length === 24) {
|
||||
where.categoryId = category;
|
||||
|
||||
Reference in New Issue
Block a user