From b89065e5c63ed4bb1a34a9e0deb708ccd2e5ef4a Mon Sep 17 00:00:00 2001 From: Kevsl Date: Fri, 14 Jun 2024 12:11:23 +0200 Subject: [PATCH] added token sell to bank --- src/crypto/crypto.controller.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/crypto/crypto.controller.ts b/src/crypto/crypto.controller.ts index deada4f..03135ad 100644 --- a/src/crypto/crypto.controller.ts +++ b/src/crypto/crypto.controller.ts @@ -38,6 +38,15 @@ export class CryptoController { return this.cryptoService.getCryptoHistory(user.id, cryptoId); } + @Post('/sell') + SellCrypto( + @Body() + dto: BuyCryptoDto, + @GetUser() user: User, + ) { + return this.cryptoService.sellCryto(user.id, dto); + } + @HttpCode(HttpStatus.CREATED) @Post('/create') createPromoCode(