I would like to trim (empty white spaces at the beggining / end of a input field) of all body values. I don't want to have to loop all body elements for each API request to clean the fields up.
I was wondering if I can overwrite the @body() annotation, and put the code in there, or if there's a input formatter or pipe that does that.
At the moment, I'm doing this:
createAccount(@Body() body: any) {
this.account.create(body.map(s => s.trim()))
}
Thanks