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

13 lines
494 B
CoffeeScript
Raw Normal View History

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)
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
refered_user_count: refered_user_count