Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Move check to inside service

Daniel Hougaard28b24115b71a
diff --git a/backend/src/server/routes/v1/bot-router.ts b/backend/src/server/routes/v1/bot-router.ts
index 91d27b2e53..507423b0db 100644
--- a/backend/src/server/routes/v1/bot-router.ts
+++ b/backend/src/server/routes/v1/bot-router.ts
@@ -1,7 +1,6 @@
import { z } from "zod";
import { ProjectBotsSchema } from "@app/db/schemas";
-import { BadRequestError } from "@app/lib/errors";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
@@ -67,12 +66,6 @@ export const registerProjectBotRouter = async (server: FastifyZodProvider) => {
},
onRequest: verifyAuth([AuthMode.JWT]),
handler: async (req) => {
- const project = await server.services.projectBot.findProjectByBotId(req.params.botId);
-
- if (project?.version === "v2") {
- throw new BadRequestError({ message: "Failed to set bot active, project has E2EE disabled" });
- }
-
const bot = await server.services.projectBot.setBotActiveState({
actor: req.permission.type,
actorId: req.permission.id,