mirror of
https://github.com/harish2704/npm-offline-registry.git
synced 2026-09-10 06:21:09 +00:00
Not tabs please
This commit is contained in:
@@ -37,12 +37,12 @@ app.get( '/:package', function( req, res, next ){
|
||||
return fileExists( cacheFile )
|
||||
.tap( function( isExists ){
|
||||
if( !isExists ){
|
||||
if ( ENABLE_NPM_FAILOVER ) {
|
||||
res._log.cacheHit = '---';
|
||||
return fetchAndCacheMetadata( packageName, cacheFile );
|
||||
} else {
|
||||
return res.status( 404 ).json( {} );
|
||||
}
|
||||
if ( ENABLE_NPM_FAILOVER ) {
|
||||
res._log.cacheHit = '---';
|
||||
return fetchAndCacheMetadata( packageName, cacheFile );
|
||||
} else {
|
||||
return res.status( 404 ).json( {} );
|
||||
}
|
||||
}
|
||||
})
|
||||
.then( function( ){
|
||||
@@ -65,12 +65,12 @@ app.get( '/:package/-/:tarball', function( req, res, next ){
|
||||
fileExists( packagePath )
|
||||
.tap( function( isExists ){
|
||||
if( !isExists ){
|
||||
if ( ENABLE_NPM_FAILOVER ) {
|
||||
res._log.cacheHit = '---';
|
||||
return fetchAndCacheTarball( packageName, version, packagePath );
|
||||
} else {
|
||||
return res.status( 404 ).json( {} );
|
||||
}
|
||||
if ( ENABLE_NPM_FAILOVER ) {
|
||||
res._log.cacheHit = '---';
|
||||
return fetchAndCacheTarball( packageName, version, packagePath );
|
||||
} else {
|
||||
return res.status( 404 ).json( {} );
|
||||
}
|
||||
}
|
||||
})
|
||||
.then( function(){
|
||||
|
||||
Reference in New Issue
Block a user