File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -361,7 +361,6 @@ class ConfigurableProxy extends EventEmitter {
361
361
deleteRoutes ( req , res , path ) {
362
362
// DELETE removes an existing route
363
363
364
- var that = this ;
365
364
return this . _routes . get ( path ) . then ( ( result ) => {
366
365
var p , code ;
367
366
if ( result ) {
@@ -374,7 +373,7 @@ class ConfigurableProxy extends EventEmitter {
374
373
return p . then ( ( ) => {
375
374
res . writeHead ( code ) ;
376
375
res . end ( ) ;
377
- that . metrics . apiRouteDeleteCount . inc ( ) ;
376
+ this . metrics . apiRouteDeleteCount . inc ( ) ;
378
377
} ) ;
379
378
} ) ;
380
379
}
@@ -629,10 +628,9 @@ class ConfigurableProxy extends EventEmitter {
629
628
handleApiRequest ( req , res ) {
630
629
// Handle a request to the REST API
631
630
if ( res ) {
632
- var that = this ;
633
631
res . on ( "finish" , ( ) => {
634
- that . metrics . requestsApiCount . labels ( res . statusCode ) . inc ( ) ;
635
- that . logResponse ( req , res ) ;
632
+ this . metrics . requestsApiCount . labels ( res . statusCode ) . inc ( ) ;
633
+ this . logResponse ( req , res ) ;
636
634
} ) ;
637
635
}
638
636
var args = [ req , res ] ;
You can’t perform that action at this time.
0 commit comments