add gloabl proxy to app settings

This commit is contained in:
Alex Holliday committed 2026-08-20 11:16:07 -07:00
1 parent cf13bc329e
commit edd9335e96
4 files changed
+18 -1

No files matched your search

@@ -40,5 +40,16 @@ export const updateAppSettingsBodyValidation = z
temperature: z.number().min(1).max(150).optional(),
})
.optional(),
globalProxyEnabled: z.boolean().optional(),
globalProxyId: z.string().nullable().optional(),
})
.strip();
.strip()
.superRefine((body, ctx) => {
if (body.globalProxyEnabled === true && !body.globalProxyId) {
ctx.addIssue({
code: "custom",
path: ["globalProxyId"],
message: "A proxy must be selected to enable the global proxy",
});
}
});