This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copy the two files bellow (pagination.decorator.ts & paginationParams.dto.ts) | |
| // Use it as | |
| // SERVICE : | |
| public async findAll(pagination: PaginationParams): Promise<Post[]> { | |
| return await this.post.findAll(pagination); | |
| } | |
| // CONTROLLER : | |
| async findAll(@GetPagination({ limit: 5 }) pagination: PaginationParams): Promise<Post[]> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| return ( | |
| <CableProvider url="<Your action cable URL>"> | |
| <Component {...pageProps} /> | |
| </CableProvider> | |
| ); |