Hello, i'm here as a humble junior looking for someone who can illuminate me, i'm doing a personal project as practice to improve my skills with some technologies, on this occasion using NestJS to create the backend.
Here is my question, i have public and privates routes, should i create a controller just for public and private to separate both path or just one controller for both?
i have dto's when is public route to return specifics data and private as well.
Here some example
@Get('/:id')
@Serialize(productDto)
getProductById(@Param('id') id: string) {
return ...
}
@Get('/admin/:id')
@Serialize(productPrivateDto)
getProductByIdAdmin(@Param('id') id: string) {
return ...
}
I would appreciate any help (โฟโนโกโน)
Top comments (0)