mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-24 21:12:38 -04:00
9 lines
257 B
JavaScript
9 lines
257 B
JavaScript
|
function getAnalyticsIdFromMongoUser(user) {
|
||
|
// ensure `analyticsId` is set to the user's `analyticsId`, and fallback to their `userId` for pre-analyticsId users
|
||
|
return user.analyticsId || user._id
|
||
|
}
|
||
|
|
||
|
module.exports = {
|
||
|
getAnalyticsIdFromMongoUser,
|
||
|
}
|