Skip to content

Commit

Permalink
Update bigquery.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
david-pepper committed Jan 22, 2025
1 parent cec425a commit 56066a5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions handlers/discount-expiry-notifier/src/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@ export const buildAuthClient = async (
// .regex(/^\d{4}-\d{2}-\d{2}$/, 'Invalid date format. Expected YYYY-MM-DD.')
// .transform((date) => new Date(date));
const BigQueryDate1 = z
.object({
value: z
.string()
.regex(/^\d{4}-\d{2}-\d{2}$/, 'Invalid date format. Expected YYYY-MM-DD.')
.transform((date) => new Date(date)), // Transform the string to a Date object
})
.transform((obj) => obj.value);
.object({
value: z
.string()
.regex(/^\d{4}-\d{2}-\d{2}$/, "Invalid date format. Expected YYYY-MM-DD.")
.transform((date) => new Date(date)), // Transform the string to a Date object
})
.transform((obj) => obj.value);

export const BigQueryResultDataSchema = z.array(
z.object({
Expand Down

0 comments on commit 56066a5

Please sign in to comment.