run prettier (#7172)

This commit is contained in:
dblythy
2021-02-12 20:18:49 +11:00
committed by GitHub
parent dc1133d355
commit e53b6c2f87
5 changed files with 28 additions and 23 deletions

View File

@@ -2048,9 +2048,9 @@ describe('Parse.Query testing', () => {
const query = new Parse.Query(TestObject); const query = new Parse.Query(TestObject);
query.matches( query.matches(
'myString', 'myString',
'parse # First fragment. We\'ll write this in one case but match insensitively\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;' + '.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', 'however, this comment must end with a newline to recognize it as a comment\n',
'mixs' 'mixs'
); );
query.find().then( query.find().then(

View File

@@ -9,8 +9,7 @@ export class LiveQueryController {
if (!config || !config.classNames) { if (!config || !config.classNames) {
this.classNames = new Set(); this.classNames = new Set();
} else if (config.classNames instanceof Array) { } else if (config.classNames instanceof Array) {
const classNames = config.classNames const classNames = config.classNames.map(name => new RegExp('^' + name + '$'));
.map(name => new RegExp("^" + name + "$"));
this.classNames = new Set(classNames); this.classNames = new Set(classNames);
} else { } else {
throw 'liveQuery.classes should be an array of string'; throw 'liveQuery.classes should be an array of string';

View File

@@ -308,15 +308,17 @@ export class UserController extends AdaptableController {
// Mark this private // Mark this private
function updateUserPassword(user, password, config) { function updateUserPassword(user, password, config) {
return rest.update( return rest
config, .update(
Auth.master(config), config,
'_User', Auth.master(config),
{ objectId: user.objectId }, '_User',
{ { objectId: user.objectId },
password: password, {
} password: password,
).then(() => user); }
)
.then(() => user);
} }
function buildEmailLink(destination, username, token, config) { function buildEmailLink(destination, username, token, config) {

View File

@@ -100,7 +100,10 @@ function RestQuery(
for (var option in restOptions) { for (var option in restOptions) {
switch (option) { switch (option) {
case 'keys': { 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)); this.keys = Array.from(new Set(keys));
break; break;
} }

View File

@@ -98,17 +98,18 @@ export class FilesRouter {
const isMaster = req.auth.isMaster; const isMaster = req.auth.isMaster;
const isLinked = user && Parse.AnonymousUtils.isLinked(user); const isLinked = user && Parse.AnonymousUtils.isLinked(user);
if (!isMaster && !config.fileUpload.enableForAnonymousUser && isLinked) { if (!isMaster && !config.fileUpload.enableForAnonymousUser && isLinked) {
next(new Parse.Error( next(
Parse.Error.FILE_SAVE_ERROR, new Parse.Error(Parse.Error.FILE_SAVE_ERROR, 'File upload by anonymous user is disabled.')
'File upload by anonymous user is disabled.' );
));
return; return;
} }
if (!isMaster && !config.fileUpload.enableForAuthenticatedUser && !isLinked && user) { if (!isMaster && !config.fileUpload.enableForAuthenticatedUser && !isLinked && user) {
next(new Parse.Error( next(
Parse.Error.FILE_SAVE_ERROR, new Parse.Error(
'File upload by authenticated user is disabled.' Parse.Error.FILE_SAVE_ERROR,
)); 'File upload by authenticated user is disabled.'
)
);
return; return;
} }
if (!isMaster && !config.fileUpload.enableForPublic && !user) { if (!isMaster && !config.fileUpload.enableForPublic && !user) {