Last active
December 9, 2018 13:10
-
-
Save Texlo-Dev/72d6558c9263685a654d69486a70a4b0 to your computer and use it in GitHub Desktop.
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 { | |
Body, | |
Controller, | |
Get, | |
Patch, | |
Post, | |
ValidationPipe | |
} from "@nestjs/common"; | |
import { TestDTO } from "../dtos/test.dto"; | |
@Controller() | |
export class TestController { | |
@Post("/test") | |
public testing(@Body(new ValidationPipe()) test: TestDTO): string { | |
return test.string; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment