Added all method on user service

This commit is contained in:
Wyatt Johnson
2016-11-17 10:30:34 -07:00
parent 68c689f95d
commit e809c479e1
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ function listUsers() {
const mongoose = require('../mongoose');
User
.find()
.all()
.then((users) => {
let table = new Table({
head: [
+8
View File
@@ -450,3 +450,11 @@ UserService.availabilityCheck = (email) => {
UserService.count = () => {
return UserModel.count();
};
/**
* Returns all the users.
* @return {Promise}
*/
UserService.all = () => {
return UserModel.find();
};