mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 13:21:37 +02:00
Revert "[web] last infrastructure conversions" GitOrigin-RevId: 48dc64553012afb5d2db4b2eb9c9898489b7e5ef
33 lines
692 B
JavaScript
33 lines
692 B
JavaScript
import { db } from '../../app/src/infrastructure/mongodb.js'
|
|
import { batchedUpdate } from '@overleaf/mongo-utils/batchedUpdate.js'
|
|
import { scriptRunner } from '../lib/ScriptRunner.mjs'
|
|
|
|
async function main(trackProgress) {
|
|
// update all applicable user models
|
|
await batchedUpdate(
|
|
db.users,
|
|
{
|
|
'writefull.enabled': false,
|
|
},
|
|
{
|
|
$set: {
|
|
'aiErrorAssistant.enabled': false,
|
|
},
|
|
},
|
|
undefined,
|
|
undefined,
|
|
{ trackProgress }
|
|
)
|
|
console.log('completed syncing writefull state with error assist')
|
|
}
|
|
|
|
export default main
|
|
|
|
try {
|
|
await scriptRunner(main)
|
|
process.exit(0)
|
|
} catch (error) {
|
|
console.error({ error })
|
|
process.exit(1)
|
|
}
|