mirror of
https://github.com/wassname/talk.git
synced 2026-07-21 12:51:03 +08:00
Added all method on user service
This commit is contained in:
+1
-1
@@ -206,7 +206,7 @@ function listUsers() {
|
||||
const mongoose = require('../mongoose');
|
||||
|
||||
User
|
||||
.find()
|
||||
.all()
|
||||
.then((users) => {
|
||||
let table = new Table({
|
||||
head: [
|
||||
|
||||
@@ -450,3 +450,11 @@ UserService.availabilityCheck = (email) => {
|
||||
UserService.count = () => {
|
||||
return UserModel.count();
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns all the users.
|
||||
* @return {Promise}
|
||||
*/
|
||||
UserService.all = () => {
|
||||
return UserModel.find();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user