diff --git a/server/src/routes/built-in-agents.ts b/server/src/routes/built-in-agents.ts index f8b7ebecb55..9c16ba6f53b 100644 --- a/server/src/routes/built-in-agents.ts +++ b/server/src/routes/built-in-agents.ts @@ -237,7 +237,6 @@ export function builtInAgentRoutes(db: Db) { const routineKey = req.params.routineKey as string; await assertBuiltInAgentsEnabled(); assertCompanyAccess(req, companyId); - const current = await svc.get(companyId, key); await assertCanControlBuiltInRoutine(req, companyId); const actor = getActorInfo(req); const state = await svc.enableRoutineSchedule(companyId, key, routineKey, { @@ -266,7 +265,6 @@ export function builtInAgentRoutes(db: Db) { const routineKey = req.params.routineKey as string; await assertBuiltInAgentsEnabled(); assertCompanyAccess(req, companyId); - const current = await svc.get(companyId, key); await assertCanControlBuiltInRoutine(req, companyId); const actor = getActorInfo(req); const state = await svc.disableRoutineSchedule(companyId, key, routineKey, {