mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
3ff142d478
* [web] Expose metric for active users in SP * Removed redundant UserHandler.setupLoginData() In the past this method was also calling a now deleted notifyDomainLicence(), but now this is just an alias for populateTeamInvites() * Added migration for `lastActive` * Added secondary read precedence to count active users GitOrigin-RevId: 86d6db31e1ae74ae40c6599e6acb731d8c4a04bd
20 lines
423 B
JavaScript
20 lines
423 B
JavaScript
const Helpers = require('./lib/helpers')
|
|
|
|
exports.tags = ['server-ce', 'server-pro', 'saas']
|
|
|
|
const indexes = [
|
|
{
|
|
key: { lastActive: 1 },
|
|
name: 'lastActive_1',
|
|
},
|
|
]
|
|
|
|
exports.migrate = async client => {
|
|
const { db } = client
|
|
await Helpers.addIndexesToCollection(db.users, indexes)
|
|
}
|
|
|
|
exports.rollback = async client => {
|
|
const { db } = client
|
|
await Helpers.dropIndexesFromCollection(db.users, indexes)
|
|
}
|