mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-10-19 07:01:35 +00:00
fix: redact apiKey from getAll AI endpoint to prevent credential exposure
This commit is contained in:
@@ -195,9 +195,10 @@ export const aiRouter = createTRPCRouter({
|
||||
|
||||
getAll: withAnyPermission("ai", ["read", "create", "update", "delete"]).query(
|
||||
async ({ ctx }) => {
|
||||
return await getAiSettingsByOrganizationId(
|
||||
const settings = await getAiSettingsByOrganizationId(
|
||||
ctx.session.activeOrganizationId,
|
||||
);
|
||||
return settings.map(({ apiKey, ...rest }) => rest);
|
||||
},
|
||||
),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user