MCPcopy Create free account
hub / github.com/parse-community/parse-server / mountRoutes

Method mountRoutes

src/Routers/CloudCodeRouter.js:25–56  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23
24export class CloudCodeRouter extends PromiseRouter {
25 mountRoutes() {
26 this.route(
27 'GET',
28 '/cloud_code/jobs',
29 middleware.promiseEnforceMasterKeyAccess,
30 CloudCodeRouter.getJobs
31 );
32 this.route(
33 'GET',
34 '/cloud_code/jobs/data',
35 middleware.promiseEnforceMasterKeyAccess,
36 CloudCodeRouter.getJobsData
37 );
38 this.route(
39 'POST',
40 '/cloud_code/jobs',
41 middleware.promiseEnforceMasterKeyAccess,
42 CloudCodeRouter.createJob
43 );
44 this.route(
45 'PUT',
46 '/cloud_code/jobs/:objectId',
47 middleware.promiseEnforceMasterKeyAccess,
48 CloudCodeRouter.editJob
49 );
50 this.route(
51 'DELETE',
52 '/cloud_code/jobs/:objectId',
53 middleware.promiseEnforceMasterKeyAccess,
54 CloudCodeRouter.deleteJob
55 );
56 }
57
58 static getJobs(req) {
59 return rest.find(req.config, req.auth, '_JobSchedule', {}, {}).then(scheduledJobs => {

Callers

nothing calls this directly

Calls 1

routeMethod · 0.80

Tested by

no test coverage detected