Skip to content

Commit 2e47fb5

Browse files
committed
Update FunctionsRouter.js
1 parent f1068ac commit 2e47fb5

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/Routers/FunctionsRouter.js

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// FunctionsRouter.js
22

3-
const { Parse } = require('parse/node');
4-
3+
import Parse from 'parse/node';
54
import { getJob, getFunction, maybeRunValidator, resolveError } from '../triggers.js';
65
import PromiseRouter from '../PromiseRouter';
76
import { promiseEnforceMasterKeyAccess, promiseEnsureIdempotency } from '../middlewares';
@@ -45,13 +44,9 @@ export class FunctionsRouter extends PromiseRouter {
4544
'/jobs/:jobName',
4645
promiseEnsureIdempotency,
4746
promiseEnforceMasterKeyAccess,
48-
function (req) {
49-
return FunctionsRouter.handleCloudJob(req);
50-
}
47+
FunctionsRouter.handleCloudJob
5148
);
52-
this.route('POST', '/jobs', promiseEnforceMasterKeyAccess, function (req) {
53-
return FunctionsRouter.handleCloudJob(req);
54-
});
49+
this.route('POST', '/jobs', promiseEnforceMasterKeyAccess, FunctionsRouter.handleCloudJob);
5550
}
5651

5752
static async handleCloudJob(req) {

0 commit comments

Comments
 (0)