mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 13:23:40 -05:00
9cc5dc968c
.../js/... -> .../src/... GitOrigin-RevId: ab509c633529440f05247d19c320ebb77d506768
25 lines
555 B
JavaScript
25 lines
555 B
JavaScript
const { db } = require('../app/src/infrastructure/mongojs')
|
|
const logger = require('logger-sharelatex')
|
|
logger.logger.level('error')
|
|
|
|
logger.log({}, 'Updating users in mongo')
|
|
|
|
db.users.update(
|
|
{
|
|
'features.github': true
|
|
},
|
|
{
|
|
$set: { 'features.gitBridge': true }
|
|
},
|
|
function(err, result) {
|
|
if (err) {
|
|
logger.err({ err: err, result: result }, 'Error updating users in mongo')
|
|
return
|
|
}
|
|
logger.log(
|
|
{ result: result },
|
|
'Updated users who have github to have gitBridge too'
|
|
)
|
|
process.exit(0)
|
|
}
|
|
)
|