cleaning package and replace jsonfile by fs-extra
This commit is contained in:
@@ -35,7 +35,7 @@ router.get( '/:filename', checkHeaders, isAuthenticated, ( req, res ) => {
|
||||
);
|
||||
if( pushFile.status == 200 ) {
|
||||
if( path.extname( pushFile.payload.file ) === '.json' ) {
|
||||
jsonfile.readFile( pushFile.payload.file, ( err, p ) => {
|
||||
fs.readJson( pushFile.payload.file, ( err, p ) => {
|
||||
if( err ) console.error( err );
|
||||
res.jsonp( p );
|
||||
} );
|
||||
|
Reference in New Issue
Block a user