Great article, a really concise intro to Nest. A couple of small points:
In the controller @Get, you are returning an array (from Filter). When you Type this up against your interface that is going to look strange. I'd be more inclined to just use .find to return the first one found.
For Delete, deleting against the Body object feels weird. I know you are not explicitly creating a RESTful API but if I can GET from products/:id, I would expect to DELETE the same way. So I'd expect to see @Delete(':id') in the service and that id used to find the object to delete.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Great article, a really concise intro to Nest. A couple of small points:
In the controller @Get, you are returning an array (from Filter). When you Type this up against your interface that is going to look strange. I'd be more inclined to just use .find to return the first one found.
For Delete, deleting against the Body object feels weird. I know you are not explicitly creating a RESTful API but if I can GET from products/:id, I would expect to DELETE the same way. So I'd expect to see @Delete(':id') in the service and that id used to find the object to delete.