Run Prettier JS #2 (#6796)

This commit is contained in:
Diamond Lewis
2020-07-13 17:13:08 -05:00
committed by GitHub
parent e6a6354b29
commit 142eaa71bd
40 changed files with 323 additions and 330 deletions

View File

@@ -70,7 +70,7 @@ export class UserController extends AdaptableController {
'_User',
{ username: username, emailVerified: true }
);
return checkIfAlreadyVerified.execute().then((result) => {
return checkIfAlreadyVerified.execute().then(result => {
if (result.results.length) {
return Promise.resolve(result.results.length[0]);
}
@@ -88,7 +88,7 @@ export class UserController extends AdaptableController {
},
{ limit: 1 }
)
.then((results) => {
.then(results => {
if (results.length != 1) {
throw 'Failed to reset password: username / email / token is invalid';
}
@@ -141,7 +141,7 @@ export class UserController extends AdaptableController {
}
const token = encodeURIComponent(user._email_verify_token);
// We may need to fetch the user in case of update email
this.getUserIfNeeded(user).then((user) => {
this.getUserIfNeeded(user).then(user => {
const username = encodeURIComponent(user.username);
const link = buildEmailLink(
@@ -179,7 +179,7 @@ export class UserController extends AdaptableController {
}
resendVerificationEmail(username) {
return this.getUserIfNeeded({ username: username }).then((aUser) => {
return this.getUserIfNeeded({ username: username }).then(aUser => {
if (!aUser || aUser.emailVerified) {
throw undefined;
}
@@ -216,7 +216,7 @@ export class UserController extends AdaptableController {
// TODO: No adapter?
}
return this.setPasswordResetToken(email).then((user) => {
return this.setPasswordResetToken(email).then(user => {
const token = encodeURIComponent(user._perishable_token);
const username = encodeURIComponent(user.username);
@@ -244,8 +244,8 @@ export class UserController extends AdaptableController {
updatePassword(username, token, password) {
return this.checkResetTokenValidity(username, token)
.then((user) => updateUserPassword(user.objectId, password, this.config))
.catch((error) => {
.then(user => updateUserPassword(user.objectId, password, this.config))
.catch(error => {
if (error && error.message) {
// in case of Parse.Error, fail with the error message only
return Promise.reject(error.message);