Skip to content

Commit ddd8279

Browse files
committed
fix uuid for seeding
1 parent dd039ab commit ddd8279

File tree

7 files changed

+14
-16
lines changed

7 files changed

+14
-16
lines changed

apps/web/app/routes/ws/_components/CreateDeploymentDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { useWorkspace } from "~/components/WorkspaceProvider";
4040

4141
// Validation schema for deployment creation
4242
const createDeploymentSchema = z.object({
43-
systemId: z.string().uuid({ message: "Valid system ID is required" }),
43+
systemId: z.string().min(2, { message: "System ID is required" }),
4444
name: z
4545
.string()
4646
.min(3, { message: "Name must be at least 3 characters long" })

apps/web/app/routes/ws/_components/CreateEnvironmentDialog.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import CelExpressionInput from "./CelExpiressionInput";
4141

4242
// Validation schema for environment creation
4343
const createEnvironmentSchema = z.object({
44-
systemId: z.string().uuid({ message: "Valid system ID is required" }),
44+
systemId: z.string().min(2, { message: "System ID is required" }),
4545
name: z
4646
.string()
4747
.min(1, { message: "Name is required" })

apps/web/app/routes/ws/deployments/_components/CreateVersionDialog.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import { useWorkspace } from "~/components/WorkspaceProvider";
4040

4141
// Validation schema for version creation
4242
const createVersionSchema = z.object({
43-
deploymentId: z.string().uuid({ message: "Valid deployment ID is required" }),
43+
deploymentId: z.string(),
4444
tag: z
4545
.string()
4646
.min(1, { message: "Tag is required" })
@@ -88,7 +88,6 @@ export function CreateVersionDialog({
8888
},
8989
});
9090

91-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
9291
const createVersionMutation = trpc.deployment.createVersion.useMutation({
9392
onSuccess: async (version) => {
9493
toast.success("Version created successfully");
@@ -115,7 +114,6 @@ export function CreateVersionDialog({
115114
const onSubmit = form.handleSubmit(async (data) => {
116115
try {
117116
const workspaceId = workspace.id;
118-
// eslint-disable-next-line @typescript-eslint/no-unsafe-call
119117
await createVersionMutation.mutateAsync({
120118
workspaceId,
121119
...data,

packages/trpc/src/routes/deployments.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ export const deploymentsRouter = router({
116116
create: protectedProcedure
117117
.input(
118118
z.object({
119-
workspaceId: z.string().uuid(),
119+
workspaceId: z.uuid(),
120120
systemId: z.string(),
121121
name: z.string().min(3).max(255),
122122
slug: z.string().min(3).max(255),
@@ -146,8 +146,8 @@ export const deploymentsRouter = router({
146146
createVersion: protectedProcedure
147147
.input(
148148
z.object({
149-
workspaceId: z.string().uuid(),
150-
deploymentId: z.string().uuid(),
149+
workspaceId: z.uuid(),
150+
deploymentId: z.string(),
151151
tag: z.string().min(1),
152152
name: z.string().optional(),
153153
status: z

packages/trpc/src/routes/environments.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export const environmentRouter = router({
1313
.input(
1414
z.object({
1515
workspaceId: z.uuid(),
16-
environmentId: z.uuid(),
16+
environmentId: z.string(),
1717
limit: z.number().min(1).max(1000).default(50),
1818
offset: z.number().min(0).default(0),
1919
}),
@@ -37,7 +37,7 @@ export const environmentRouter = router({
3737
.input(
3838
z.object({
3939
workspaceId: z.uuid(),
40-
environmentId: z.uuid(),
40+
environmentId: z.string(),
4141
}),
4242
)
4343
.meta({
@@ -61,7 +61,7 @@ export const environmentRouter = router({
6161
list: protectedProcedure
6262
.input(
6363
z.object({
64-
workspaceId: z.string().uuid(),
64+
workspaceId: z.uuid(),
6565
}),
6666
)
6767
.meta({
@@ -86,7 +86,7 @@ export const environmentRouter = router({
8686
.input(
8787
z.object({
8888
workspaceId: z.uuid(),
89-
environmentId: z.uuid(),
89+
environmentId: z.string(),
9090
data: z.object({
9191
resourceSelectorCel: z.string().min(1).max(255),
9292
}),
@@ -146,7 +146,7 @@ export const environmentRouter = router({
146146
.input(
147147
z.object({
148148
workspaceId: z.uuid(),
149-
systemId: z.uuid(),
149+
systemId: z.string(),
150150
name: z.string().min(1).max(255),
151151
description: z.string().max(500).optional(),
152152
resourceSelectorCel: z.string().min(1).max(255),

packages/trpc/src/routes/resources.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export const resourcesRouter = router({
7171
.input(
7272
z.object({
7373
workspaceId: z.uuid(),
74-
resourceId: z.uuid(),
74+
resourceId: z.string(),
7575
}),
7676
)
7777
.query(async ({ input }) => {

packages/trpc/src/routes/workspace.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const workspaceRouter = router({
4545
.perform(Permission.WorkspaceGet)
4646
.on({ type: "workspace", id: input.workspaceId }),
4747
})
48-
.input(z.object({ workspaceId: z.string().uuid() }))
48+
.input(z.object({ workspaceId: z.uuid() }))
4949
.query(async ({ ctx, input }) => {
5050
const workspace = await ctx.db
5151
.select()
@@ -72,7 +72,7 @@ export const workspaceRouter = router({
7272
})
7373
.input(
7474
z.object({
75-
workspaceId: z.string().uuid(),
75+
workspaceId: z.uuid(),
7676
data: z.object({
7777
name: z
7878
.string()

0 commit comments

Comments
 (0)