mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
allow ip to set via query string for plans page
This commit is contained in:
parent
e443809206
commit
af769c7871
1 changed files with 2 additions and 2 deletions
|
@ -22,7 +22,7 @@ module.exports = SubscriptionController =
|
|||
if req.query.v?
|
||||
viewName = "#{viewName}_#{req.query.v}"
|
||||
logger.log viewName:viewName, "showing plans page"
|
||||
GeoIpLookup.getCurrencyCode req.ip, (err, recomendedCurrency)->
|
||||
GeoIpLookup.getCurrencyCode req.query?.ip || req.ip, (err, recomendedCurrency)->
|
||||
res.render viewName,
|
||||
title: "plans_and_pricing"
|
||||
plans: plans
|
||||
|
@ -41,7 +41,7 @@ module.exports = SubscriptionController =
|
|||
res.redirect "/user/subscription"
|
||||
else
|
||||
currency = req.query.currency?.toUpperCase()
|
||||
GeoIpLookup.getCurrencyCode req.ip, (err, recomendedCurrency)->
|
||||
GeoIpLookup.getCurrencyCode req.query?.ip || req.ip, (err, recomendedCurrency)->
|
||||
return next(err) if err?
|
||||
if recomendedCurrency? and !currency?
|
||||
currency = recomendedCurrency
|
||||
|
|
Loading…
Reference in a new issue