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

@@ -60,7 +60,7 @@ class ParseLiveQueryServer {
// Initialize websocket server
this.parseWebSocketServer = new ParseWebSocketServer(
server,
(parseWebsocket) => this._onConnect(parseWebsocket),
parseWebsocket => this._onConnect(parseWebsocket),
config
);
@@ -165,13 +165,13 @@ class ParseLiveQueryServer {
// Check ACL
return this._matchesACL(acl, client, requestId);
})
.then((isMatched) => {
.then(isMatched => {
if (!isMatched) {
return null;
}
client.pushDelete(requestId, deletedParseObject);
})
.catch((error) => {
.catch(error => {
logger.error('Matching ACL error : ', error);
});
}
@@ -298,7 +298,7 @@ class ParseLiveQueryServer {
originalParseObject
);
},
(error) => {
error => {
logger.error('Matching ACL error : ', error);
}
);
@@ -308,7 +308,7 @@ class ParseLiveQueryServer {
}
_onConnect(parseWebsocket: any): void {
parseWebsocket.on('message', (request) => {
parseWebsocket.on('message', request => {
if (typeof request === 'string') {
try {
request = JSON.parse(request);
@@ -426,10 +426,10 @@ class ParseLiveQueryServer {
cacheController: this.cacheController,
sessionToken: sessionToken,
})
.then((auth) => {
.then(auth => {
return { auth, userId: auth && auth.user && auth.user.id };
})
.catch((error) => {
.catch(error => {
// There was an error with the session token
const result = {};
if (error && error.code === Parse.Error.INVALID_SESSION_TOKEN) {
@@ -523,7 +523,7 @@ class ParseLiveQueryServer {
return Promise.resolve()
.then(async () => {
// Resolve false right away if the acl doesn't have any roles
const acl_has_roles = Object.keys(acl.permissionsById).some((key) =>
const acl_has_roles = Object.keys(acl.permissionsById).some(key =>
key.startsWith('role:')
);
if (!acl_has_roles) {