Merge pull request #18225 from overleaf/em-typescript-eslint

Add typescript-eslint rule: no-floating-promises

GitOrigin-RevId: 8c3decdff537c885f5bfeb5250b7805480bc6602
This commit is contained in:
Eric Mc Sween
2024-05-27 10:22:20 +00:00
committed by Copybot
parent 814b085b44
commit 876ee4d967
48 changed files with 1156 additions and 798 deletions
@@ -6,7 +6,11 @@ const AnalyticsManager = require('../Analytics/AnalyticsManager')
async function optIn(userId) {
await UserUpdater.promises.updateUser(userId, { $set: { betaProgram: true } })
metrics.inc('beta-program.opt-in')
AnalyticsManager.setUserPropertyForUser(userId, 'beta-program', true)
AnalyticsManager.setUserPropertyForUserInBackground(
userId,
'beta-program',
true
)
}
async function optOut(userId) {
@@ -14,7 +18,11 @@ async function optOut(userId) {
$set: { betaProgram: false },
})
metrics.inc('beta-program.opt-out')
AnalyticsManager.setUserPropertyForUser(userId, 'beta-program', false)
AnalyticsManager.setUserPropertyForUserInBackground(
userId,
'beta-program',
false
)
}
module.exports = {