Skip to content

Commit

Permalink
fix region undercut
Browse files Browse the repository at this point in the history
  • Loading branch information
cohenaj194 committed Jun 26, 2024
1 parent a939e88 commit b345bef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/routes/wow.region-undercut.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const itemAuction = z.object({

const validateInput = z.array(
z.object({
homeRealmName: z.string(),
homeRealmName: z.union([z.string(), z.number()]), // Accepts both string and number
region: z.string(),
user_auctions: z.array(z.union([petAuction, itemAuction]))
})
Expand All @@ -67,7 +67,9 @@ export const action: ActionFunction = async ({ request }) => {

try {
const parsedInput = JSON.parse(input)
// console.log(parsedInput)
const validInput = validateInput.safeParse(parsedInput)
// console.log(validInput)

if (!validInput.success) {
throw new Error('Invalid input')
Expand Down

0 comments on commit b345bef

Please sign in to comment.