mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-04 10:06:13 +01:00
fix : fixed trade
This commit is contained in:
@@ -60,6 +60,7 @@ export class TradeService {
|
|||||||
id: dto.id_offer,
|
id: dto.id_offer,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const crypto = await this.prisma.crypto.findFirst({
|
const crypto = await this.prisma.crypto.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: offer.id_crypto,
|
id: offer.id_crypto,
|
||||||
@@ -68,7 +69,7 @@ export class TradeService {
|
|||||||
|
|
||||||
const buyer = await this.prisma.user.findFirst({
|
const buyer = await this.prisma.user.findFirst({
|
||||||
where: {
|
where: {
|
||||||
id: offer.id_user,
|
id: userId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user