added token sell to bank

This commit is contained in:
Kevsl 2024-06-14 12:11:23 +02:00
parent 61131388d5
commit b89065e5c6

View File

@ -38,6 +38,15 @@ export class CryptoController {
return this.cryptoService.getCryptoHistory(user.id, cryptoId); 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) @HttpCode(HttpStatus.CREATED)
@Post('/create') @Post('/create')
createPromoCode( createPromoCode(