mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-28 14:38:46 +00:00
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:
@@ -373,6 +373,7 @@ const createSchema = createInsertSchema(applications, {
|
|||||||
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
|
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
|
||||||
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
|
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
|
||||||
enableSubmodules: z.boolean().optional(),
|
enableSubmodules: z.boolean().optional(),
|
||||||
|
icon: z.string().max(2 * 1024 * 1024, "Icon must be less than 2MB").nullable().optional(),
|
||||||
});
|
});
|
||||||
|
|
||||||
export const apiCreateApplication = createSchema.pick({
|
export const apiCreateApplication = createSchema.pick({
|
||||||
|
|||||||
Reference in New Issue
Block a user