update eslint config + other changes

This commit is contained in:
2023-07-11 15:40:39 +02:00
parent d763448a12
commit d0647ba1bb
5 changed files with 28 additions and 7 deletions

View File

@@ -7,9 +7,27 @@
*
*/
const path = require( 'path' );
const fs = require( 'fs' );
module.exports.getData = function getData ( db, searchQuery ) {
console.log( db + searchQuery );
return new Promise( resolve => {
resolve( '$2b$05$ElMYWoMjk7567lXkIkee.e.6cxCrWU4gkfuNLB8gmGYLQQPm7gT3O' );
} );
};
module.exports.getJSONData = function getData ( file ) {
return new Promise( ( resolve, reject ) => {
fs.readFile( path.join( __dirname + '/../../' + file ), ( error, data ) => {
if ( error ) {
reject( 'Error occurred: Error trace: ' + error );
}
resolve( JSON.parse( data ) );
} );
} );
};
module.exports.getJSONDataSync = function getData ( file ) {
return JSON.parse( fs.readFileSync( path.join( __dirname + '/../../' + file ) ) );
};

View File

@@ -0,0 +1 @@
class