Remove redundant built-in routine lookups

Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
DottaandPaperclip committed 2026-07-09 20:50:34 +00:00
1 parent 03ab5e07c3
commit 940df6a77c
1 file changed
-2
-2
View File
@@ -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, {