28 lines
780 B
TypeScript
28 lines
780 B
TypeScript
import { PrismaClient } from '@prisma/client'
|
|
|
|
import createDiscogs from './discogs';
|
|
import createOffers from './offers';
|
|
import createLog from './log';
|
|
import createApi from './api';
|
|
import createEvents from './events';
|
|
import createPg from './pg';
|
|
import createNotify from './notify';
|
|
|
|
export default function createServices(log) {
|
|
const prisma = new PrismaClient();
|
|
const pg = createPg(log, prisma);
|
|
const discogs = createDiscogs(log, pg);
|
|
const offers = createOffers(log, pg);
|
|
const events = createEvents(log, pg, discogs, offers);
|
|
const notify = createNotify(log, pg, events);
|
|
const api = createApi(log, pg, discogs, offers, events);
|
|
|
|
return {
|
|
api,
|
|
discogs,
|
|
events,
|
|
notify,
|
|
pg,
|
|
prisma,
|
|
};
|
|
} |