Created
March 27, 2025 18:36
-
-
Save Vatsalya-singhi/6c37ad95cca4f8efa7062603645021bb to your computer and use it in GitHub Desktop.
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
import { Controller, Get, Param, ParseIntPipe } from '@nestjs/common'; | |
@Controller('users') | |
export class UsersController { | |
@Get(':id') | |
findOne(@Param('id', ParseIntPipe) id: number) { | |
return { message: `Fetching user with ID ${id}` }; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment