// 1st-party
import type { ServiceMethodFactory } from "@ethicdevs/react-monolith";
import type { PipelineServiceDeps } from "./types";
const makeGetPipelineStages: ServiceMethodFactory<
PipelineServiceDeps,
[string],
Promise<any>
> = ({ request }) => {
return async (pipelineId: string) => {
return request.prisma.stage.findMany({
where: { pipelineId },
orderBy: { order: "asc" },
});
};
};
export default makeGetPipelineStages;