19 lines
No EOL
361 B
JavaScript
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; |