Openstatus www.openstatus.dev

fix: periodicity other (#1319)

* fix: periodicity other

* chore: periodicity

authored by

Maximilian Kaske and committed by
GitHub
0ade17c2 b5de56cb

+5 -8
+3 -7
apps/dashboard/src/app/(dashboard)/onboarding/client.tsx
··· 92 92 trpc.workspace.get.queryOptions(), 93 93 ); 94 94 const createMonitorMutation = useMutation( 95 - trpc.monitor.create.mutationOptions({ 95 + trpc.monitor.new.mutationOptions({ 96 96 onSuccess: () => { 97 97 setSearchParams({ step: "2" }); 98 98 refetch(); ··· 149 149 await createMonitorMutation.mutateAsync({ 150 150 url: values.url, 151 151 name: new URL(values.url).hostname, 152 - // FIXME: undefined values should be allowed 152 + method: "GET", 153 153 headers: [], 154 - assertions: undefined, 154 + assertions: [], 155 155 jobType: "http", 156 - // FIXME: check which regions are available on free plan 157 - regions: ["ams", "iad", "syd"], 158 156 active: true, 159 - public: false, 160 - workspaceId: workspace?.id, 161 157 }); 162 158 }} 163 159 />
+2 -1
packages/api/src/router/monitor.ts
··· 1305 1305 }), 1306 1306 1307 1307 new: protectedProcedure 1308 + .meta({ track: Events.CreateMonitor, trackProps: ["url", "jobType"] }) 1308 1309 .input( 1309 1310 z.object({ 1310 1311 name: z.string(), ··· 1399 1400 body: input.body, 1400 1401 active: input.active, 1401 1402 workspaceId: ctx.workspace.id, 1402 - periodicity: "30m", 1403 + periodicity: ctx.workspace.plan === "free" ? "30m" : "1m", 1403 1404 regions: regions.join(","), 1404 1405 assertions: serialize(assertions), 1405 1406 updatedAt: new Date(),