mirror of
https://github.com/Kevsl/crypto-exchange-api.git
synced 2026-02-05 10:26:12 +01:00
fixed crypto up after buy
This commit is contained in:
@@ -102,6 +102,15 @@ export class CryptoService {
|
||||
});
|
||||
}
|
||||
}
|
||||
const newCryptoValue = crypto.value * 1.1;
|
||||
await this.prisma.crypto.update({
|
||||
where: {
|
||||
id: dto.id_crypto,
|
||||
},
|
||||
data: {
|
||||
value: newCryptoValue,
|
||||
},
|
||||
});
|
||||
|
||||
return crypto;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user