mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2025-07-09 14:00:12 +02:00
added token sell to bank
This commit is contained in:
parent
b89065e5c6
commit
7f00cfb382
@ -84,7 +84,7 @@ export class CryptoService {
|
||||
|
||||
const newBalance = userAsset.amount - dto.amount;
|
||||
if (newBalance > 0) {
|
||||
await this.prisma.userHasCrypto.update({
|
||||
return this.prisma.userHasCrypto.update({
|
||||
where: {
|
||||
id: userAsset.id,
|
||||
},
|
||||
@ -93,7 +93,7 @@ export class CryptoService {
|
||||
},
|
||||
});
|
||||
} else {
|
||||
await this.prisma.userHasCrypto.delete({
|
||||
return this.prisma.userHasCrypto.delete({
|
||||
where: {
|
||||
id: userAsset.id,
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user