Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.

Commit 61138ca

Browse files
committed
Create Rate Limit date format
1 parent c75ec07 commit 61138ca

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

  • src/routes/(protected)/consumers/[consumer_id]/rate-limits/create

‎src/routes/(protected)/consumers/[consumer_id]/rate-limits/create/+page.server.ts‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,20 +117,20 @@ export const actions = {
117117
});
118118
}
119119

120-
// Build request body - format dates as ISO 8601 with time
121-
// Convert YYYY-MM-DD to YYYY-MM-DDT00:00:00.000Z
122-
const fromDateISO = `${from_date}T00:00:00.000Z`;
123-
const toDateISO = `${to_date}T23:59:59.999Z`;
120+
// Build request body - format dates as ISO 8601 with time (no milliseconds)
121+
// Convert YYYY-MM-DD to YYYY-MM-DDTHH:MM:SSZ
122+
const fromDateISO = `${from_date}T00:00:00Z`;
123+
const toDateISO = `${to_date}T23:59:59Z`;
124124

125125
const requestBody: any = {
126126
from_date: fromDateISO,
127127
to_date: toDateISO,
128-
per_second_call_limit: per_second_call_limit || "",
129-
per_minute_call_limit: per_minute_call_limit || "",
130-
per_hour_call_limit: per_hour_call_limit || "",
131-
per_day_call_limit: per_day_call_limit || "",
132-
per_week_call_limit: per_week_call_limit || "",
133-
per_month_call_limit: per_month_call_limit || "",
128+
per_second_call_limit: per_second_call_limit || "-1",
129+
per_minute_call_limit: per_minute_call_limit || "-1",
130+
per_hour_call_limit: per_hour_call_limit || "-1",
131+
per_day_call_limit: per_day_call_limit || "-1",
132+
per_week_call_limit: per_week_call_limit || "-1",
133+
per_month_call_limit: per_month_call_limit || "-1",
134134
};
135135

136136
try {

0 commit comments

Comments
 (0)