This commit is contained in:
x032205
2025-12-18 22:33:18 -05:00
parent fc12692f9a
commit c747bc479e
2 changed files with 7 additions and 7 deletions

View File

@@ -25,11 +25,11 @@ import {
UpdateSSHAccountSchema UpdateSSHAccountSchema
} from "@app/ee/services/pam-resource/ssh/ssh-resource-schemas"; } from "@app/ee/services/pam-resource/ssh/ssh-resource-schemas";
import { registerPamResourceEndpoints } from "./pam-account-endpoints"; import { registerPamAccountEndpoints } from "./pam-account-endpoints";
export const PAM_ACCOUNT_REGISTER_ROUTER_MAP: Record<PamResource, (server: FastifyZodProvider) => Promise<void>> = { export const PAM_ACCOUNT_REGISTER_ROUTER_MAP: Record<PamResource, (server: FastifyZodProvider) => Promise<void>> = {
[PamResource.Postgres]: async (server: FastifyZodProvider) => { [PamResource.Postgres]: async (server: FastifyZodProvider) => {
registerPamResourceEndpoints({ registerPamAccountEndpoints({
server, server,
resourceType: PamResource.Postgres, resourceType: PamResource.Postgres,
accountResponseSchema: SanitizedPostgresAccountWithResourceSchema, accountResponseSchema: SanitizedPostgresAccountWithResourceSchema,
@@ -38,7 +38,7 @@ export const PAM_ACCOUNT_REGISTER_ROUTER_MAP: Record<PamResource, (server: Fasti
}); });
}, },
[PamResource.MySQL]: async (server: FastifyZodProvider) => { [PamResource.MySQL]: async (server: FastifyZodProvider) => {
registerPamResourceEndpoints({ registerPamAccountEndpoints({
server, server,
resourceType: PamResource.MySQL, resourceType: PamResource.MySQL,
accountResponseSchema: SanitizedMySQLAccountWithResourceSchema, accountResponseSchema: SanitizedMySQLAccountWithResourceSchema,
@@ -47,7 +47,7 @@ export const PAM_ACCOUNT_REGISTER_ROUTER_MAP: Record<PamResource, (server: Fasti
}); });
}, },
[PamResource.SSH]: async (server: FastifyZodProvider) => { [PamResource.SSH]: async (server: FastifyZodProvider) => {
registerPamResourceEndpoints({ registerPamAccountEndpoints({
server, server,
resourceType: PamResource.SSH, resourceType: PamResource.SSH,
accountResponseSchema: SanitizedSSHAccountWithResourceSchema, accountResponseSchema: SanitizedSSHAccountWithResourceSchema,
@@ -56,7 +56,7 @@ export const PAM_ACCOUNT_REGISTER_ROUTER_MAP: Record<PamResource, (server: Fasti
}); });
}, },
[PamResource.Kubernetes]: async (server: FastifyZodProvider) => { [PamResource.Kubernetes]: async (server: FastifyZodProvider) => {
registerPamResourceEndpoints({ registerPamAccountEndpoints({
server, server,
resourceType: PamResource.Kubernetes, resourceType: PamResource.Kubernetes,
accountResponseSchema: SanitizedKubernetesAccountWithResourceSchema, accountResponseSchema: SanitizedKubernetesAccountWithResourceSchema,
@@ -65,7 +65,7 @@ export const PAM_ACCOUNT_REGISTER_ROUTER_MAP: Record<PamResource, (server: Fasti
}); });
}, },
[PamResource.AwsIam]: async (server: FastifyZodProvider) => { [PamResource.AwsIam]: async (server: FastifyZodProvider) => {
registerPamResourceEndpoints({ registerPamAccountEndpoints({
server, server,
resourceType: PamResource.AwsIam, resourceType: PamResource.AwsIam,
accountResponseSchema: SanitizedAwsIamAccountWithResourceSchema, accountResponseSchema: SanitizedAwsIamAccountWithResourceSchema,

View File

@@ -7,7 +7,7 @@ import { writeLimit } from "@app/server/config/rateLimiter";
import { verifyAuth } from "@app/server/plugins/auth/verify-auth"; import { verifyAuth } from "@app/server/plugins/auth/verify-auth";
import { AuthMode } from "@app/services/auth/auth-type"; import { AuthMode } from "@app/services/auth/auth-type";
export const registerPamResourceEndpoints = <C extends TPamAccount>({ export const registerPamAccountEndpoints = <C extends TPamAccount>({
server, server,
resourceType, resourceType,
createAccountSchema, createAccountSchema,