prisma pretty noice

This commit is contained in:
ntr committed 2022-07-28 00:18:11 +10:00
1 parent eb04fdb9a5
commit adcc19564f
11 files changed
+133 -185

No files matched your search

+7 -4
View File
@@ -1,13 +1,15 @@
import fs from 'fs/promises';
import _ from 'lodash';
import Promise from 'bluebird';
import { PrismaClient } from '@prisma/client'
import discogsService from './src/discogs';
import pgService from './src/pg';
import { logAxiosError } from './src/utils';
async function start() {
const pg = pgService();
const prisma = new PrismaClient();
const pg = pgService(prisma);
const discogs = discogsService(pg);
const usernames = [
@@ -47,9 +49,10 @@ async function start() {
// return listings;
}
return Promise.resolve(usernames)
.map(u => discogs.user(u))
.map(populateUserListings);
for (const u of usernames) {
const user = await discogs.user(u)
await populateUserListings(user);
}
// return Promise.map(releases, async w => {
// try {