mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-11-26 06:10:58 +00:00
3c253a7c4b
* added picking pattern * removed all changes to helpers
19 lines
385 B
JavaScript
19 lines
385 B
JavaScript
"use strict";
|
|
|
|
var User = require("../user/user");
|
|
var client = require("../ensl/client")();
|
|
var async = require("async");
|
|
|
|
var getRandomUser = callback => {
|
|
let id = Math.floor(Math.random() * 5000) + 1;
|
|
User.find(id, function (error, user) {
|
|
if (error) return getRandomUser(callback);
|
|
return callback(error, user);
|
|
})
|
|
};
|
|
|
|
module.exports = {
|
|
getRandomUser: getRandomUser
|
|
};
|
|
|
|
|