mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 14:43:46 +01:00
Merge pull request #23820 from overleaf/jdt-transition-wf-accounts-script
Script to transition WF users from auto-load to auto-create GitOrigin-RevId: 538ff04dece52e4c46a4a592cb5089d20eb5aa7a
This commit is contained in:
committed by
Copybot
parent
18c2b4108d
commit
8a81b0777a
@@ -0,0 +1,28 @@
|
||||
import { db } from '../../app/src/infrastructure/mongodb.js'
|
||||
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
||||
|
||||
async function main() {
|
||||
// update all applicable user models
|
||||
await batchedUpdate(
|
||||
db.users,
|
||||
{
|
||||
'writefull.enabled': false,
|
||||
},
|
||||
{
|
||||
$set: {
|
||||
'aiErrorAssistant.enabled': false,
|
||||
},
|
||||
}
|
||||
)
|
||||
console.log('completed syncing writefull state with error assist')
|
||||
}
|
||||
|
||||
export default main
|
||||
|
||||
try {
|
||||
await main()
|
||||
process.exit(0)
|
||||
} catch (error) {
|
||||
console.error({ error })
|
||||
process.exit(1)
|
||||
}
|
||||
Reference in New Issue
Block a user