Skip to content

Commit

Permalink
run prettier (#7172)
Browse files Browse the repository at this point in the history
  • Loading branch information
dblythy authored Feb 12, 2021
1 parent dc1133d commit e53b6c2
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 23 deletions.
6 changes: 3 additions & 3 deletions spec/ParseQuery.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2048,9 +2048,9 @@ describe('Parse.Query testing', () => {
const query = new Parse.Query(TestObject);
query.matches(
'myString',
'parse # First fragment. We\'ll write this in one case but match insensitively\n' +
'.com # Second fragment. This can be separated by any character, including newline;' +
'however, this comment must end with a newline to recognize it as a comment\n',
"parse # First fragment. We'll write this in one case but match insensitively\n" +
'.com # Second fragment. This can be separated by any character, including newline;' +
'however, this comment must end with a newline to recognize it as a comment\n',
'mixs'
);
query.find().then(
Expand Down
3 changes: 1 addition & 2 deletions src/Controllers/LiveQueryController.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ export class LiveQueryController {
if (!config || !config.classNames) {
this.classNames = new Set();
} else if (config.classNames instanceof Array) {
const classNames = config.classNames
.map(name => new RegExp("^" + name + "$"));
const classNames = config.classNames.map(name => new RegExp('^' + name + '$'));
this.classNames = new Set(classNames);
} else {
throw 'liveQuery.classes should be an array of string';
Expand Down
20 changes: 11 additions & 9 deletions src/Controllers/UserController.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,15 +308,17 @@ export class UserController extends AdaptableController {

// Mark this private
function updateUserPassword(user, password, config) {
return rest.update(
config,
Auth.master(config),
'_User',
{ objectId: user.objectId },
{
password: password,
}
).then(() => user);
return rest
.update(
config,
Auth.master(config),
'_User',
{ objectId: user.objectId },
{
password: password,
}
)
.then(() => user);
}

function buildEmailLink(destination, username, token, config) {
Expand Down
5 changes: 4 additions & 1 deletion src/RestQuery.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,10 @@ function RestQuery(
for (var option in restOptions) {
switch (option) {
case 'keys': {
const keys = restOptions.keys.split(',').filter(key => key.length > 0).concat(AlwaysSelectedKeys);
const keys = restOptions.keys
.split(',')
.filter(key => key.length > 0)
.concat(AlwaysSelectedKeys);
this.keys = Array.from(new Set(keys));
break;
}
Expand Down
17 changes: 9 additions & 8 deletions src/Routers/FilesRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,17 +98,18 @@ export class FilesRouter {
const isMaster = req.auth.isMaster;
const isLinked = user && Parse.AnonymousUtils.isLinked(user);
if (!isMaster && !config.fileUpload.enableForAnonymousUser && isLinked) {
next(new Parse.Error(
Parse.Error.FILE_SAVE_ERROR,
'File upload by anonymous user is disabled.'
));
next(
new Parse.Error(Parse.Error.FILE_SAVE_ERROR, 'File upload by anonymous user is disabled.')
);
return;
}
if (!isMaster && !config.fileUpload.enableForAuthenticatedUser && !isLinked && user) {
next(new Parse.Error(
Parse.Error.FILE_SAVE_ERROR,
'File upload by authenticated user is disabled.'
));
next(
new Parse.Error(
Parse.Error.FILE_SAVE_ERROR,
'File upload by authenticated user is disabled.'
)
);
return;
}
if (!isMaster && !config.fileUpload.enableForPublic && !user) {
Expand Down

0 comments on commit e53b6c2

Please sign in to comment.