File tree Expand file tree Collapse file tree 6 files changed +30
-30
lines changed Expand file tree Collapse file tree 6 files changed +30
-30
lines changed Original file line number Diff line number Diff line change 11module . exports = function ( req , res ) {
2- res . json ( {
3- anyMethod : req . method
4- } ) ;
5- }
2+ res . json ( {
3+ anyMethod : req . method
4+ } ) ;
5+ } ;
Original file line number Diff line number Diff line change 11module . exports = function ( req , res , next ) {
2- var data = "" ;
3- req . on ( 'data' , function ( chunk ) { data += chunk } )
4- req . on ( 'end' , function ( ) {
2+ let data = '' ;
3+ req . on ( 'data' , ( chunk ) => { data += chunk ; } ) ;
4+ req . on ( 'end' , ( ) => {
55 req . rawBody = data ;
66 res . json ( {
77 requestString : data
88 } ) ;
99
1010 next ( ) ;
11- } )
12- }
11+ } ) ;
12+ } ;
Original file line number Diff line number Diff line change 11module . exports = function ( req , res ) {
2- res . status ( 201 ) . json ( {
3- name : req . body . name
4- } ) ;
5- }
2+ res . status ( 201 ) . json ( {
3+ name : req . body . name
4+ } ) ;
5+ } ;
Original file line number Diff line number Diff line change 11module . exports = function ( req , res ) {
2- res . json ( {
3- id : req . params . user_id ,
4- method : 'GET'
5- } ) ;
6- }
2+ res . json ( {
3+ id : req . params . user_id ,
4+ method : 'GET'
5+ } ) ;
6+ } ;
Original file line number Diff line number Diff line change 11module . exports = function ( req , res ) {
2- res . json ( {
3- id : req . params . user_id ,
4- method : 'GET' ,
5- version : 1
6- } ) ;
7- }
2+ res . json ( {
3+ id : req . params . user_id ,
4+ method : 'GET' ,
5+ version : 1
6+ } ) ;
7+ } ;
Original file line number Diff line number Diff line change 11module . exports = function ( req , res ) {
2- res . json ( {
3- id : req . params . user_id ,
4- method : 'GET' ,
5- version : 2
6- } ) ;
7- }
2+ res . json ( {
3+ id : req . params . user_id ,
4+ method : 'GET' ,
5+ version : 2
6+ } ) ;
7+ } ;
You can’t perform that action at this time.
0 commit comments