add root accounts

This commit is contained in:
janis
2023-08-31 16:12:03 +02:00
parent 1ecfbacc89
commit b801417c01
8 changed files with 94 additions and 14 deletions

View File

@@ -88,6 +88,16 @@ class GETHandler {
resolve( this.settings.currency );
} else if ( call === 'getAdminAccounts' ) {
db.getData( 'admin' ).then( data => {
if ( data[ 0 ] ) {
resolve( { 'data': data, 'status': 'ok' } );
} else {
resolve( { 'data': {}, 'status': 'empty' } );
}
} ).catch( err => {
reject( { 'code': 500, 'message': 'ERR_DB: ' + err } );
} );
} else if ( call === 'getRootAccountDetails' ) {
db.getJSONData( 'rootAccount' ).then( data => {
resolve( data );
} ).catch( err => {
reject( { 'code': 500, 'message': 'ERR_DB: ' + err } );