comments n stuff
This commit is contained in:
1 parent
28759f9e70
commit
f546d76912
4 files changed
+20
-4
No files matched your search
+2
-2
@@ -247,14 +247,14 @@ export default function createPg(log: Log, prisma: PrismaClient) {
|
||||
})));
|
||||
}
|
||||
|
||||
async function offersUpdate(offers: Offer[]) {
|
||||
async function offersUpdate(offers) {
|
||||
return await prisma.$transaction(
|
||||
offers.map(offer => prisma.offer.upsert({
|
||||
where: {
|
||||
listingId: offer.listingId,
|
||||
},
|
||||
create: offer,
|
||||
update: _.omit(offer, ['status']),
|
||||
update: _.omit(offer, ['status', 'id']),
|
||||
}))
|
||||
);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user