overleaf/services/web/app/coffee/Features/Referal/ReferalController.coffee
Simon Detheridge 8b55643f7e Merge pull request #1030 from sharelatex/spd-bonus-program
Implement bonus program

GitOrigin-RevId: a18dd8a916c6f317a11661f106cdb4a2983c4ad8
2018-10-23 11:36:17 +00:00

12 lines
494 B
CoffeeScript

logger = require('logger-sharelatex')
ReferalHandler = require('./ReferalHandler')
AuthenticationController = require('../Authentication/AuthenticationController')
module.exports =
bonus: (req, res)->
user_id = AuthenticationController.getLoggedInUserId(req)
ReferalHandler.getReferedUsers user_id, (err, refered_users, refered_user_count)->
res.render "referal/bonus",
title: "bonus_please_recommend_us"
refered_users: refered_users
refered_user_count: refered_user_count