Before I did this, it worked, backend got a HTTP response.
const programId = programIds[0]
await res.unstable_revalidate(`/hu/buyTicket/${programId}`)
return res.json({ revalidated: true })
but for multiple call, I get error:
Promise.all(
programIds.map(
async (programId: string) =>
await res.unstable_revalidate(`/hu/buyTicket/${programId}`)
)
).then((res) => {
return res.json({ revalidated: true })
})
Error:
Property 'json' does not exist on type 'any[]'