Skip to content

Run prettier #7172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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