Getting organization by slug, adding this in url. And working on permissions.

This commit is contained in:
charles-gauthereau
2024-12-30 12:28:11 +01:00
parent a6f48ea762
commit 379271501d
21 changed files with 76 additions and 58 deletions
@@ -2,9 +2,11 @@ import {z} from "zod";
export const OrganizationSchema = z.object({
name: z.string().min(5).max(40),
slug: z.string().regex(/^[a-zA-Z0-9_-]*$/).min(5).max(20),
name: z.string().min(5, 'Name must be at least 5 characters long').max(40, 'Name must be at most 40 characters long'),
slug: z.string()
.regex(/^[a-zA-Z0-9_-]*$/, 'Slug can only contain letters, numbers, underscores, and hyphens')
.min(5, 'Slug must be at least 5 characters long')
.max(20, 'Slug must be at most 20 characters long'),
});
export type OrganizationSchema = z.infer<typeof OrganizationSchema>;