File tree Expand file tree Collapse file tree 2 files changed +10
-12
lines changed
Expand file tree Collapse file tree 2 files changed +10
-12
lines changed Original file line number Diff line number Diff line change @@ -21,22 +21,22 @@ export class PetController {
2121
2222 @Get ( '/:id' )
2323 @OnUndefined ( PetNotFoundError )
24- public one ( @Param ( 'id' ) id : string ) : Promise < Pet | undefined > {
24+ public one ( @Param ( 'id' ) id : string ) : Promise < Pet | undefined > {
2525 return this . petService . findOne ( id ) ;
2626 }
2727
2828 @Post ( )
29- public create ( @Body ( ) pet : Pet ) : Promise < Pet > {
29+ public create ( @Body ( ) pet : Pet ) : Promise < Pet > {
3030 return this . petService . create ( pet ) ;
3131 }
3232
3333 @Put ( '/:id' )
34- public update ( @Param ( 'id' ) id : string , @Body ( ) pet : Pet ) : Promise < Pet > {
34+ public update ( @Param ( 'id' ) id : string , @Body ( ) pet : Pet ) : Promise < Pet > {
3535 return this . petService . update ( id , pet ) ;
3636 }
3737
3838 @Delete ( '/:id' )
39- public delete ( @Param ( 'id' ) id : string ) : Promise < void > {
39+ public delete ( @Param ( 'id' ) id : string ) : Promise < void > {
4040 return this . petService . delete ( id ) ;
4141 }
4242
Original file line number Diff line number Diff line change @@ -12,33 +12,31 @@ export class UserController {
1212
1313 constructor (
1414 private userService : UserService
15- ) {
16- console . log ( 'UserControllerUserControllerUserController' ) ;
17- }
15+ ) { }
1816
1917 @Get ( )
20- public find ( @CurrentUser ( ) user ?: User ) : Promise < User [ ] > {
18+ public find ( @CurrentUser ( ) user ?: User ) : Promise < User [ ] > {
2119 return this . userService . find ( ) ;
2220 }
2321
2422 @Get ( '/:id' )
2523 @OnUndefined ( UserNotFoundError )
26- public one ( @Param ( 'id' ) id : string ) : Promise < User | undefined > {
24+ public one ( @Param ( 'id' ) id : string ) : Promise < User | undefined > {
2725 return this . userService . findOne ( id ) ;
2826 }
2927
3028 @Post ( )
31- public create ( @Body ( ) user : User ) : Promise < User > {
29+ public create ( @Body ( ) user : User ) : Promise < User > {
3230 return this . userService . create ( user ) ;
3331 }
3432
3533 @Put ( '/:id' )
36- public update ( @Param ( 'id' ) id : string , @Body ( ) user : User ) : Promise < User > {
34+ public update ( @Param ( 'id' ) id : string , @Body ( ) user : User ) : Promise < User > {
3735 return this . userService . update ( id , user ) ;
3836 }
3937
4038 @Delete ( '/:id' )
41- public delete ( @Param ( 'id' ) id : string ) : Promise < void > {
39+ public delete ( @Param ( 'id' ) id : string ) : Promise < void > {
4240 return this . userService . delete ( id ) ;
4341 }
4442
You can’t perform that action at this time.
0 commit comments