Merge pull request #3495 from overleaf/ae-prettier-2

Upgrade Prettier to v2

GitOrigin-RevId: 85aa3fa1acb6332c4f58c46165a43d1a51471f33
This commit is contained in:
Alf Eaton
2021-04-15 02:05:22 +00:00
committed by Copybot
parent 930d7ba028
commit 1ebc8a79cb
582 changed files with 20382 additions and 20374 deletions
@@ -41,7 +41,7 @@ const SubscriptionGroupHandler = {
return Subscription.updateOne(
{ admin_id: oldId },
{ admin_id: newId },
function(error) {
function (error) {
if (error != null) {
return callback(error)
}
@@ -51,7 +51,7 @@ const SubscriptionGroupHandler = {
'manager_ids',
oldId,
newId,
function(error) {
function (error) {
if (error != null) {
return callback(error)
}
@@ -71,12 +71,12 @@ const SubscriptionGroupHandler = {
isUserPartOfGroup(user_id, subscription_id, callback) {
if (callback == null) {
callback = function(err, partOfGroup) {}
callback = function (err, partOfGroup) {}
}
return SubscriptionLocator.getSubscriptionByMemberIdAndId(
user_id,
subscription_id,
function(err, subscription) {
function (err, subscription) {
let partOfGroup
if (subscription != null) {
partOfGroup = true
@@ -90,7 +90,7 @@ const SubscriptionGroupHandler = {
getTotalConfirmedUsersInGroup(subscription_id, callback) {
if (callback == null) {
callback = function(err, totalUsers) {}
callback = function (err, totalUsers) {}
}
return SubscriptionLocator.getSubscription(
subscription_id,
@@ -106,7 +106,7 @@ const SubscriptionGroupHandler = {
}
}
var replaceInArray = function(model, property, oldValue, newValue, callback) {
var replaceInArray = function (model, property, oldValue, newValue, callback) {
// Mongo won't let us pull and addToSet in the same query, so do it in
// two. Note we need to add first, since the query is based on the old user.
const query = {}
@@ -118,7 +118,7 @@ var replaceInArray = function(model, property, oldValue, newValue, callback) {
const setOldValue = {}
setOldValue[property] = oldValue
model.updateMany(query, { $addToSet: setNewValue }, function(error) {
model.updateMany(query, { $addToSet: setNewValue }, function (error) {
if (error) {
return callback(error)
}