@premieroctet/next-admin
Version:
Next-Admin provides a customizable and turnkey admin dashboard for applications built with Next.js and powered by the Prisma ORM. It aims to simplify the development process by providing a turnkey admin system that can be easily integrated into your proje
20 lines (19 loc) • 592 B
JavaScript
import { optionsFromResource } from "../utils/prisma.mjs";
const handleOptionsSearch = (body, prisma, options)=>{
const { originModel, property, model, query, page, perPage } = body;
return optionsFromResource({
prisma,
originResource: originModel,
property: property,
resource: model,
options,
context: {},
searchParams: new URLSearchParams({
search: query,
page: page.toString(),
itemsPerPage: perPage.toString()
}),
appDir: false
});
};
export { handleOptionsSearch };