Refactored retrieval of categories and improved runtime search of files in category

Fixed issue with editing/saving categories

Database queries can now handle nested object paths

Code cleanup
This commit is contained in:
Isaac Abadi
2022-06-17 19:43:32 -04:00
parent c810d4d878
commit b56c66f705
10 changed files with 50 additions and 30 deletions

View File

@@ -272,6 +272,11 @@ describe('Database', async function() {
const result = db_api.applyFilterLocalDB([{test: 'test'}, {test: 'test1'}], {test: filter}, 'find');
assert(result && result['test'] === 'test1');
});
it('Nested', async function() {
const result = db_api.applyFilterLocalDB([{test1: {test2: 'test3'}}, {test4: 'test5'}], {'test1.test2': 'test3'}, 'find');
assert(result && result['test1']['test2'] === 'test3');
});
})
});