Created
May 11, 2020 07:17
-
-
Save onwuvic/9ddc7442399e913788a66640646b960b to your computer and use it in GitHub Desktop.
Post example controller
This file contains 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
import { Controller, Get } from '@nestjs/common'; | |
@Controller('posts') | |
export class PostsController { | |
@Get() | |
findAll(): string { | |
return 'This action returns all posts'; | |
} | |
@Get(:id) | |
findOne(@Param('id') id: number): string { | |
return 'This action returns one post'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment