Enable prefer-const lint rule (#3202)
This commit is contained in:
committed by
Florent Vilmart
parent
a6c988176e
commit
ca286b7108
@@ -14,9 +14,9 @@ export class PushRouter extends PromiseRouter {
|
||||
throw new Parse.Error(Parse.Error.PUSH_MISCONFIGURED, 'Push controller is not set');
|
||||
}
|
||||
|
||||
let where = PushRouter.getQueryCondition(req);
|
||||
const where = PushRouter.getQueryCondition(req);
|
||||
let resolve;
|
||||
let promise = new Promise((_resolve) => {
|
||||
const promise = new Promise((_resolve) => {
|
||||
resolve = _resolve;
|
||||
});
|
||||
pushController.sendPush(req.body, where, req.config, req.auth, (pushStatusId) => {
|
||||
@@ -38,9 +38,9 @@ export class PushRouter extends PromiseRouter {
|
||||
* @returns {Object} The query condition, the where field in a query api call
|
||||
*/
|
||||
static getQueryCondition(req) {
|
||||
let body = req.body || {};
|
||||
let hasWhere = typeof body.where !== 'undefined';
|
||||
let hasChannels = typeof body.channels !== 'undefined';
|
||||
const body = req.body || {};
|
||||
const hasWhere = typeof body.where !== 'undefined';
|
||||
const hasChannels = typeof body.channels !== 'undefined';
|
||||
|
||||
let where;
|
||||
if (hasWhere && hasChannels) {
|
||||
|
||||
Reference in New Issue
Block a user