You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
411 B
TypeScript

import type { Options } from "node_modules/payload/dist/collections/operations/local/find";
import { getPayload } from "@/utils/payload";
export const getFoodDeclarations = async (
opts: Omit<Options<"food-declaration">, "collection" | "pagination">,
) => {
const payload = await getPayload();
return await payload.find({
collection: "food-declaration",
pagination: false,
...opts,
});
};