class AdminController { constructor(database) { this.database = database; }; getAll(onSuccess, onError) { let collection = this.database.collection('publicStates'); let cursor = collection.find({}, {}); cursor.toArray((item) => { console.log('item: ' + item); }); onSuccess({}); }; }; module.exports = AdminController;