Skip to content

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

fix k8s account update not working

x032205ea219dacabfb
diff --git a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
index ab82c51adc..ae146808bb 100644
--- a/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
+++ b/backend/src/ee/routes/v1/pam-account-routers/pam-account-router.ts
@@ -20,11 +20,12 @@ import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type";
const SanitizedAccountSchema = z.union([
- SanitizedSSHAccountWithResourceSchema, // ORDER MATTERS
+ // ORDER MATTERS
+ SanitizedKubernetesAccountWithResourceSchema,
+ SanitizedSSHAccountWithResourceSchema,
SanitizedPostgresAccountWithResourceSchema,
SanitizedMySQLAccountWithResourceSchema,
SanitizedRedisAccountWithResourceSchema,
- SanitizedKubernetesAccountWithResourceSchema,
SanitizedAwsIamAccountWithResourceSchema
]);
@@ -77,7 +78,7 @@ export const registerPamAccountRouter = async (server: FastifyZodProvider) => {
}
});
- return account;
+ return account as z.infer<typeof SanitizedAccountSchema>;
}
});