mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
Merge pull request #14380 from overleaf/jdt-history-onboarding-saves
save onboarding completion on user GitOrigin-RevId: bcb4d9d1909aa11e5cfcf283e04fe1057460bf7b
This commit is contained in:
committed by
Copybot
parent
3d9e9f6aeb
commit
3bb7a7c7ba
13
services/web/app/src/Features/Tutorial/TutorialHandler.js
Normal file
13
services/web/app/src/Features/Tutorial/TutorialHandler.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const UserUpdater = require('../User/UserUpdater')
|
||||
|
||||
async function saveCompletion(userId, tutorialKey) {
|
||||
const completionDate = new Date()
|
||||
|
||||
await UserUpdater.promises.updateUser(userId, {
|
||||
$set: {
|
||||
[`completedTutorials.${tutorialKey}`]: completionDate,
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = { saveCompletion }
|
||||
Reference in New Issue
Block a user