It returns a serialized string instead of an object (which would let NestJS to do the serialization, to set the correct content-type, and to maybe also generate a more informative OpenAPI specification).
There seems to be no reason for it to do that.
Currently, `commission` method is declared as
```
@Post()
@UsePipes(new BodyValidationPipe(transactionBodySchema))
async commission(
@Body() transactionInput: TransactionInput,
): Promise<string> {
return JSON.stringify({
amount: (await this.getCommissionAmount(transactionInput)).toFixed(2),
currency: Currency.EUR,
});
}
```
It returns a serialized string instead of an object (which would let NestJS to do the serialization, to set the correct content-type, and to maybe also generate a more informative OpenAPI specification).
There seems to be no reason for it to do that.
Currently,
commission
method is declared asIt returns a serialized string instead of an object (which would let NestJS to do the serialization, to set the correct content-type, and to maybe also generate a more informative OpenAPI specification).
There seems to be no reason for it to do that.