Skip to content

Commit

Permalink
fix: API endpoint /v4/schedules/status now respects enable/disable in…
Browse files Browse the repository at this point in the history
… config file

Fixes #509
  • Loading branch information
mountaindude committed Jun 21, 2022
1 parent 3d7c833 commit f8d9417
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/routes/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ module.exports = async (fastify, options) => {
fastify.put('/v4/schedules/stopall', apiPUTSchedulesStopAll, handlerPUTSchedulesStop);
}

fastify.get('/v4/schedules/status', apiGETSchedulerStatus, handlerGETSchedulesStatus);
if (
globals.config.has('Butler.restServerEndpointsEnable.scheduler.getScheduleStatusAll') &&
globals.config.get('Butler.restServerEndpointsEnable.scheduler.getScheduleStatusAll')
) {
globals.logger.debug('Registering REST endpoint PUT /v4/schedules/status');
fastify.get('/v4/schedules/status', apiGETSchedulerStatus, handlerGETSchedulesStatus);
}
}
};

0 comments on commit f8d9417

Please sign in to comment.