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
425 B
TypeScript
15 lines
425 B
TypeScript
import type { Options } from "node_modules/payload/dist/collections/operations/local/find";
|
|
import { getPayload } from "@/utils/payload";
|
|
|
|
export const getOpeningTimes = async (
|
|
opts: Omit<Options<"opening-time">, "collection" | "sort" | "pagination">,
|
|
) => {
|
|
const payload = await getPayload();
|
|
return await payload.find({
|
|
collection: "opening-time",
|
|
sort: "from",
|
|
pagination: false,
|
|
...opts,
|
|
});
|
|
};
|