fixed crypto up after buy

This commit is contained in:
Kevsl
2024-06-07 11:35:30 +02:00
parent 312115142e
commit 28e061722a
3 changed files with 18 additions and 1 deletions

View File

@@ -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;
}