strip encrypted ssh key from org response

This commit is contained in:
miloschwartz
2026-08-26 09:38:50 -04:00
parent 72d2c79793
commit 9a5824900d
+5 -3
View File
@@ -16,13 +16,12 @@ const getOrgSchema = z.strictObject({
});
export type GetOrgResponse = {
org: Org;
org: Omit<Org, "sshCaPrivateKey">;
};
const GetOrgResponseDataSchema = z.object({
org: z.object({}).passthrough()
});
registry.registerPath({
method: "get",
path: "/org/{orgId}",
@@ -76,9 +75,12 @@ export async function getOrg(
);
}
// sshCaPrivateKey is encrypted anyway but just to be safe
const { sshCaPrivateKey: _, ...orgWithoutPrivateKey } = org;
return response<GetOrgResponse>(res, {
data: {
org
org: orgWithoutPrivateKey
},
success: true,
error: false,