2014-02-12 05:23:40 -05:00
|
|
|
logger = require('logger-sharelatex')
|
|
|
|
ReferalHandler = require('./ReferalHandler')
|
2016-09-05 10:58:31 -04:00
|
|
|
AuthenticationController = require('../Authentication/AuthenticationController')
|
2014-02-12 05:23:40 -05:00
|
|
|
|
2016-09-05 10:58:31 -04:00
|
|
|
module.exports =
|
2014-02-12 05:23:40 -05:00
|
|
|
bonus: (req, res)->
|
2016-09-05 10:58:31 -04:00
|
|
|
user_id = AuthenticationController.getLoggedInUserId(req)
|
2018-10-23 07:24:34 -04:00
|
|
|
ReferalHandler.getReferedUsers user_id, (err, refered_users, refered_user_count)->
|
2014-02-12 05:23:40 -05:00
|
|
|
res.render "referal/bonus",
|
2014-08-01 08:47:14 -04:00
|
|
|
title: "bonus_please_recommend_us"
|
2014-02-12 05:23:40 -05:00
|
|
|
refered_users: refered_users
|
2018-10-23 07:24:34 -04:00
|
|
|
refered_user_count: refered_user_count
|