dgdgproto/app/controllers/AdminController.js

19 lines
361 B
JavaScript
Raw Normal View History

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;