feat: ✨ display food declarations on menu page
parent
1c420d9db8
commit
48a5cc5a76
@ -0,0 +1,14 @@
|
|||||||
|
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,
|
||||||
|
});
|
||||||
|
};
|
Loading…
Reference in New Issue