Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/api/src/routes/v1_ratelimits_setOverride.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const route = createRoute({
"Identifier of your user, this can be their userId, an email, an ip or anything else. Wildcards ( * ) can be used to match multiple identifiers, More info can be found at https://www.unkey.com/docs/ratelimiting/overrides#wildcard-rules",
example: "user_123",
}),
limit: z.number().int().positive().openapi({
limit: z.number().int().nonnegative().openapi({
description: "How many requests may pass in a given window.",
example: 10,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ const overrideValidationSchema = z.object({
.trim()
.min(2, "Name is required and should be at least 2 characters")
.max(250),
limit: z.coerce
.number()
.int()
.min(1, "Limit must be at least 1")
.max(10_000, "Limit cannot exceed 10,000"),
limit: z.coerce.number().int().nonnegative().max(10_000, "Limit cannot exceed 10,000"),
duration: z.coerce
.number()
.int()
Expand Down Expand Up @@ -139,7 +135,7 @@ export const IdentifierDialog = ({
onOpenChange={onOpenChange}
title="Override Identifier"
footer={
<div className="w-full flex flex-col gap-2 items-center justify-center">
<div className="flex flex-col items-center justify-center w-full gap-2">
<Button
type="submit"
form="identifier-form" // Connect to form ID
Expand All @@ -151,7 +147,7 @@ export const IdentifierDialog = ({
>
Override Identifier
</Button>
<div className="text-gray-9 text-xs">
<div className="text-xs text-gray-9">
Changes are propagated globally within 60 seconds
</div>
</div>
Expand Down