dgdgproto/app/controllers/AdminController.js
2020-03-29 18:21:36 +02:00

19 lines
No EOL
361 B
JavaScript

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;