Skip to content

Commit 4c2080f

Browse files
fex: pipe-test string->number
1 parent 9200459 commit 4c2080f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pipe-test/src/app.controller.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ export class AppController {
1717
constructor(private readonly appService: AppService) {}
1818

1919
@Get()
20-
getHello(@Query('aa', ParseIntPipe) aa: string): string {
20+
getHello(@Query('aa', ParseIntPipe) aa: number): number {
2121
return aa + 1;
2222
}
2323

2424
@Get('aa')
2525
aa(@Query('aa', new ParseIntPipe({
2626
errorHttpStatusCode: HttpStatus.NOT_FOUND
27-
})) aa: string): string {
27+
})) aa: number): number {
2828
return aa + 1;
2929
}
3030

@@ -34,7 +34,7 @@ export class AppController {
3434
console.log(msg);
3535
throw new HttpException('xxx ' + msg, HttpStatus.NOT_IMPLEMENTED)
3636
}
37-
})) aa: string): string {
37+
})) aa: number): number {
3838
return aa + 1;
3939
}
4040

0 commit comments

Comments
 (0)