Merge pull request #6760 from overleaf/jpa-v1-subscription-logging

[web] log when v1 returns a non expired personal subscription

GitOrigin-RevId: 4e08e57a380d3d3512faeba93241be7c1590fb27
This commit is contained in:
Timothée Alby 2022-02-15 14:37:05 +01:00 committed by Copybot
parent de20b5b443
commit 0f3b73da99

View file

@ -12,6 +12,7 @@
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
*/
let V1SubscriptionManager
const logger = require('@overleaf/logger')
const UserGetter = require('../User/UserGetter')
const request = require('requestretry')
const settings = require('@overleaf/settings')
@ -48,6 +49,12 @@ module.exports = V1SubscriptionManager = {
// Throw away 'anonymous', etc as being equivalent to null
planName = null
}
if (planName != null && planName !== 'v1_free') {
logger.warn(
{ v1Id, planName },
'got non expired personal subscription'
)
}
return callback(null, planName, v1Id)
}
)