add first json db functions

This commit is contained in:
2023-08-15 10:42:24 +02:00
parent 1beba0131a
commit 3e7ff741a3
5 changed files with 39 additions and 31 deletions

View File

@@ -14,13 +14,11 @@
class PluginManager {
constructor () {}
install ( plugin ) {
loadSettings ( plugin ) {
}
update () {}
uninstall ( plugin ) {
saveSettings ( plugin, settings ) {
}
}

View File

@@ -11,11 +11,11 @@ const fs = require( 'fs' );
const path = require( 'path' );
module.exports = ( app, settings ) => {
console.log( '\n\n[ Plugin Loader ] Loading plugins\n' );
let otherPlugins = fs.readdirSync( path.join( __dirname + '/others' ) );
console.log( '\n\n' );
for ( let plugin in otherPlugins ) {
console.log( '[ Plugin Loader ] Loaded plugin "' + otherPlugins[ plugin ] + '"' );
require( './others/' + otherPlugins[ plugin ] + '/' + otherPlugins[ plugin ] + 'Routes.js' )( app, settings );
console.log( '[ Plugin Loader ] Loaded plugin "' + otherPlugins[ plugin ] + '"' );
}
require( './payments/' + settings.payments + '/' + settings.payments + 'Routes.js' )( app, settings );