fix(cron): use getJobState helper in handlePauseResume

Self-review follow-up: handlePauseResume read job.state directly while
the rest of the page goes through getJobState(), which falls back to
the enabled flag when state is null/undefined. With the backend
normalizer in this PR, state is always populated on the wire, so this
has no observable effect today — but using the helper keeps the page
consistent and resilient against older Hermes backends that don't run
the normalizer.
This commit is contained in:
kshitijk4poor 2026-05-09 13:40:57 +05:30 committed by kshitij
parent e572737274
commit 96dc272623

View file

@ -128,7 +128,7 @@ export default function CronPage() {
const handlePauseResume = async (job: CronJob) => {
try {
const isPaused = job.state === "paused";
const isPaused = getJobState(job) === "paused";
if (isPaused) {
await api.resumeCronJob(job.id);
showToast(