mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 18:03:43 +00:00
Revert "Add in option to sync all users" - too dangerous!
This reverts commit 218e042aba6784f32777f496e1706300845c3f44.
This commit is contained in:
parent
6838904d65
commit
a54a69159a
1 changed files with 4 additions and 12 deletions
|
@ -1,13 +1,3 @@
|
|||
let USER_QUERY = null
|
||||
if (process.argv[2] === '--all') {
|
||||
USER_QUERY = {}
|
||||
} else if (process.argv[2] === '--v1-only') {
|
||||
USER_QUERY = { 'overleaf.id': { $exists: true } }
|
||||
} else {
|
||||
console.error(`Usage:\n\n\tnode ${process.argv[1]} (--all|--v1-only)`)
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
const {db} = require('../app/js/infrastructure/mongojs')
|
||||
const FeaturesUpdater = require(
|
||||
'../app/js/Features/Subscription/FeaturesUpdater'
|
||||
|
@ -19,7 +9,7 @@ const async = require('async')
|
|||
const logger = require('logger-sharelatex')
|
||||
logger.logger.level('error')
|
||||
|
||||
const areFeaturesEqual = function (featuresA, featuresB) {
|
||||
const areFeaturesEqual = function(featuresA, featuresB) {
|
||||
for (const feature in featuresA) {
|
||||
if (featuresA[feature] !== featuresB[feature]) {
|
||||
return false
|
||||
|
@ -31,7 +21,9 @@ const areFeaturesEqual = function (featuresA, featuresB) {
|
|||
var outOfSyncUserCount = 0
|
||||
var userCount = null
|
||||
|
||||
db.users.find(USER_QUERY, {
|
||||
db.users.find({
|
||||
'overleaf.id': { $exists: true }
|
||||
}, {
|
||||
overleaf: 1,
|
||||
features: 1
|
||||
}, function (error, users) {
|
||||
|
|
Loading…
Reference in a new issue