Skip to content

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

Remove not needed scope

Fang-Pen Lina993fc07c1c4
diff --git a/backend/src/server/routes/v1/app-connection-routers/app-connection-endpoints.ts b/backend/src/server/routes/v1/app-connection-routers/app-connection-endpoints.ts
index 6ff77d9cff..7cd3f30127 100644
--- a/backend/src/server/routes/v1/app-connection-routers/app-connection-endpoints.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/app-connection-endpoints.ts
@@ -38,25 +38,22 @@ export const registerAppConnectionEndpoints = <T extends TAppConnection, I exten
sanitizedResponseSchema: z.ZodTypeAny;
}) => {
const appName = APP_CONNECTION_NAME_MAP[app];
- const appNameForOpId = (() => {
- const specialCases: Record<string, string> = {
- [AppConnection.OnePass]: "OnePassword",
- [AppConnection.GitHub]: "GitHub",
- [AppConnection.GitHubRadar]: "GitHubRadar",
- [AppConnection.GitLab]: "GitLab",
- [AppConnection.MsSql]: "MsSql",
- [AppConnection.MySql]: "MySql",
- [AppConnection.OracleDB]: "OracleDb",
- [AppConnection.MongoDB]: "MongoDb"
- };
- return (
- specialCases[app] ??
- app
- .split("-")
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
- .join("")
- );
- })();
+ const specialCases: Record<string, string> = {
+ [AppConnection.OnePass]: "OnePassword",
+ [AppConnection.GitHub]: "GitHub",
+ [AppConnection.GitHubRadar]: "GitHubRadar",
+ [AppConnection.GitLab]: "GitLab",
+ [AppConnection.MsSql]: "MsSql",
+ [AppConnection.MySql]: "MySql",
+ [AppConnection.OracleDB]: "OracleDb",
+ [AppConnection.MongoDB]: "MongoDb"
+ };
+ const appNameForOpId =
+ specialCases[app] ??
+ app
+ .split("-")
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
+ .join("");
server.route({
method: "GET",
diff --git a/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts b/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts
index 90e4fe069a..347ef43fb8 100644
--- a/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts
+++ b/backend/src/server/routes/v1/secret-sync-routers/secret-sync-endpoints.ts
@@ -43,20 +43,17 @@ export const registerSyncSecretsEndpoints = <T extends TSecretSync, I extends TS
responseSchema: z.ZodTypeAny;
}) => {
const destinationName = SECRET_SYNC_NAME_MAP[destination];
- const destinationNameForOpId = (() => {
- const specialCases: Record<string, string> = {
- [SecretSync.OnePass]: "OnePassword",
- [SecretSync.GitHub]: "GitHub",
- [SecretSync.GitLab]: "GitLab"
- };
- return (
- specialCases[destination] ??
- destination
- .split("-")
- .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
- .join("")
- );
- })();
+ const specialCases: Record<string, string> = {
+ [SecretSync.OnePass]: "OnePassword",
+ [SecretSync.GitHub]: "GitHub",
+ [SecretSync.GitLab]: "GitLab"
+ };
+ const destinationNameForOpId =
+ specialCases[destination] ??
+ destination
+ .split("-")
+ .map((word) => word.charAt(0).toUpperCase() + word.slice(1))
+ .join("");
server.route({
method: "GET",