run prettier (#7172)
This commit is contained in:
@@ -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(
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user