feat: add icon field to application schema with size validation

- Introduced a new optional `icon` field to the application schema, allowing for icon uploads.
- Implemented validation to ensure the icon size does not exceed 2MB, enhancing data integrity.
This commit is contained in:
Mauricio Siu
2026-04-04 20:32:31 -06:00
parent 8dd970674d
commit 1753ac6605

View File

@@ -373,6 +373,7 @@ const createSchema = createInsertSchema(applications, {
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
enableSubmodules: z.boolean().optional(),
icon: z.string().max(2 * 1024 * 1024, "Icon must be less than 2MB").nullable().optional(),
});
export const apiCreateApplication = createSchema.pick({