Discontinue the bonus program (#17919)
GitOrigin-RevId: d30ace08a340dd17a68c3cfe82e589bb37b5959f
This commit is contained in:
@@ -256,30 +256,6 @@ module.exports = function (webRouter, privateApiRouter, publicApiRouter) {
|
||||
next()
|
||||
})
|
||||
|
||||
webRouter.use(function (req, res, next) {
|
||||
res.locals.buildReferalUrl = function (referalMedium) {
|
||||
let url = Settings.siteUrl
|
||||
const currentUser = SessionManager.getSessionUser(req.session)
|
||||
if (
|
||||
currentUser != null &&
|
||||
(currentUser != null ? currentUser.referal_id : undefined) != null
|
||||
) {
|
||||
url += `?r=${currentUser.referal_id}&rm=${referalMedium}&rs=b` // Referal source = bonus
|
||||
}
|
||||
return url
|
||||
}
|
||||
res.locals.getReferalId = function () {
|
||||
const currentUser = SessionManager.getSessionUser(req.session)
|
||||
if (
|
||||
currentUser != null &&
|
||||
(currentUser != null ? currentUser.referal_id : undefined) != null
|
||||
) {
|
||||
return currentUser.referal_id
|
||||
}
|
||||
}
|
||||
next()
|
||||
})
|
||||
|
||||
webRouter.use(function (req, res, next) {
|
||||
res.locals.csrfToken = req != null ? req.csrfToken() : undefined
|
||||
next()
|
||||
|
||||
Reference in New Issue
Block a user