cleaning package and replace jsonfile by fs-extra

This commit is contained in:
2023-02-22 08:00:08 +01:00
parent 559ead2f11
commit a03e35c9e2
11 changed files with 67 additions and 213 deletions

View File

@@ -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 );
} );