Skip to content

Commit 1753ac6

Browse files
committed
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.
1 parent 8dd9706 commit 1753ac6

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

packages/server/src/db/schema/application.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -373,6 +373,7 @@ const createSchema = createInsertSchema(applications, {
373373
endpointSpecSwarm: EndpointSpecSwarmSchema.nullable(),
374374
ulimitsSwarm: UlimitsSwarmSchema.nullable(),
375375
enableSubmodules: z.boolean().optional(),
376+
icon: z.string().max(2 * 1024 * 1024, "Icon must be less than 2MB").nullable().optional(),
376377
});
377378

378379
export const apiCreateApplication = createSchema.pick({

0 commit comments

Comments
 (0)