Skip to content

Commit 2aaf218

Browse files
committed
fix(backend): add min(1) validation to org names to prevent empty identities
1 parent 0d8e0f2 commit 2aaf218

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎apps/dokploy/server/api/routers/organization.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const organizationRouter = createTRPCRouter({
2525
create: protectedProcedure
2626
.input(
2727
z.object({
28-
name: z.string(),
28+
name: z.string().min(1),
2929
logo: z.string().optional(),
3030
}),
3131
)
@@ -130,7 +130,7 @@ export const organizationRouter = createTRPCRouter({
130130
.input(
131131
z.object({
132132
organizationId: z.string(),
133-
name: z.string(),
133+
name: z.string().min(1),
134134
logo: z.string().optional(),
135135
defaultRole: z.string().min(1).nullable().optional(),
136136
}),

0 commit comments

Comments
 (0)