yeh boi
This commit is contained in:
1 parent
30bf7426e4
commit
323c7877b1
13 files changed
+94
-52
No files matched your search
@@ -18,6 +18,7 @@ export interface Pg {
|
||||
|
||||
wantCreate: (discogsWant: any, user: User) => Promise<Want>,
|
||||
wantList: (user: User) => Promise<Want[]>,
|
||||
wantsToSync: () => Promise<Want[]>,
|
||||
listingUpsert: (listing: Listing, want: Want) => Promise<Listing>,
|
||||
listingFind: (id: DiscogsListing) => Promise<Listing>,
|
||||
listingRmUnlisted: (want: Want, ids: DiscogsListing[]) => Promise<number>,
|
||||
@@ -60,6 +61,10 @@ export default function createPg(log: Log, prisma: PrismaClient): Pg {
|
||||
});
|
||||
}
|
||||
|
||||
async function wantsToSync() {
|
||||
return prisma.want.findMany({});
|
||||
}
|
||||
|
||||
async function wantCreate(discogsRelease, user) {
|
||||
const data: { userId: UUID, release: DiscogsListing, data: any } = {
|
||||
data: discogsRelease,
|
||||
@@ -149,6 +154,7 @@ export default function createPg(log: Log, prisma: PrismaClient): Pg {
|
||||
|
||||
wantCreate,
|
||||
wantList,
|
||||
wantsToSync,
|
||||
listingUpsert,
|
||||
listingFind,
|
||||
listingRmUnlisted,
|
||||
|
||||
Reference in new issue
Block a user