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-14 14:17:21 +01:00
committed by Copybot
parent 930d7ba028
commit 1ebc8a79cb
582 changed files with 20382 additions and 20374 deletions

View File

@@ -64,10 +64,7 @@ const ProjectController = {
return true
}
const data = `${rolloutName}:${objectId.toString()}`
const md5hash = crypto
.createHash('md5')
.update(data)
.digest('hex')
const md5hash = crypto.createHash('md5').update(data).digest('hex')
const counter = parseInt(md5hash.slice(26, 32), 16)
return counter % 100 < percentage
},
@@ -162,7 +159,7 @@ const ProjectController = {
const projectId = req.params.Project_id
const userId = AuthenticationController.getLoggedInUserId(req)
ProjectDeleter.archiveProject(projectId, userId, function(err) {
ProjectDeleter.archiveProject(projectId, userId, function (err) {
if (err != null) {
return next(err)
} else {
@@ -175,7 +172,7 @@ const ProjectController = {
const projectId = req.params.Project_id
const userId = AuthenticationController.getLoggedInUserId(req)
ProjectDeleter.unarchiveProject(projectId, userId, function(err) {
ProjectDeleter.unarchiveProject(projectId, userId, function (err) {
if (err != null) {
return next(err)
} else {
@@ -188,7 +185,7 @@ const ProjectController = {
const projectId = req.params.project_id
const userId = AuthenticationController.getLoggedInUserId(req)
ProjectDeleter.trashProject(projectId, userId, function(err) {
ProjectDeleter.trashProject(projectId, userId, function (err) {
if (err != null) {
return next(err)
} else {
@@ -201,7 +198,7 @@ const ProjectController = {
const projectId = req.params.project_id
const userId = AuthenticationController.getLoggedInUserId(req)
ProjectDeleter.untrashProject(projectId, userId, function(err) {
ProjectDeleter.untrashProject(projectId, userId, function (err) {
if (err != null) {
return next(err)
} else {