mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2024-12-18 00:31:25 +00:00
17 lines
383 B
JavaScript
17 lines
383 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
|
|
};
|