mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
8b55643f7e
Implement bonus program GitOrigin-RevId: a18dd8a916c6f317a11661f106cdb4a2983c4ad8
8 lines
305 B
CoffeeScript
8 lines
305 B
CoffeeScript
User = require('../../models/User').User
|
|
|
|
module.exports =
|
|
getReferedUsers: (user_id, callback)->
|
|
User.findById user_id, (err, user)->
|
|
refered_users = user.refered_users || []
|
|
refered_user_count= user.refered_user_count || refered_users.length
|
|
callback null, refered_users, refered_user_count
|