refactor(api): started implementing all of the tables needed for full data synchronization
BREAKING CHANGE: refer to body
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import { prisma } from "../constants";
|
||||
import { Prisma } from "../../generated/prisma/client";
|
||||
import {
|
||||
buildCollectorFindManyArgs,
|
||||
CollectorQueryOptions,
|
||||
} from "../helper/collectorQuery";
|
||||
|
||||
type OpportunityCollectorOpts = CollectorQueryOptions<
|
||||
Prisma.OpportunitySelect,
|
||||
Prisma.OpportunityInclude
|
||||
>;
|
||||
|
||||
export default async (opts?: OpportunityCollectorOpts) => {
|
||||
const args: Prisma.OpportunityFindManyArgs = buildCollectorFindManyArgs<
|
||||
Prisma.OpportunitySelect,
|
||||
Prisma.OpportunityInclude
|
||||
>(opts);
|
||||
|
||||
const data = await prisma.opportunity.findMany(args);
|
||||
|
||||
return data;
|
||||
};
|
||||
Reference in New Issue
Block a user