overleaf/services/web/app/coffee/Features/Referal/ReferalHandler.coffee

7 lines
217 B
CoffeeScript
Raw Normal View History

2014-02-12 10:23:40 +00:00
User = require('../../models/User').User
module.exports =
getReferedUserIds: (user_id, callback)->
User.findById user_id, (err, user)->
refered_users = user.refered_users || []
callback "null", refered_users