import payloadConfig from "@/payload.config";
import { getPayload } from "payload";

export async function fetchForm(formID: number) {
  const payload = await getPayload({ config: payloadConfig });
  const formRes = await payload.findByID({
    collection: "forms",
    id: formID,
  });

  return formRes;
}
