Make tsc happy when using strings as Date in embed
Validation on embeds has interesting behavior. Embeds have a `timestamp`
property that is of type `Date`. However when providing a Date,
`WebhookExecuteSchema` silently ends the operation.

The resolution was to use strings and to annotate them with `//
@ts-expect-error`. This was not my first choice, but it was the best
option I saw.

The other option is to allow `Embeds` to pass strings as a timestamp but
I'd want a second opinion before making that change.
1 parent 9143c1d commit 590331518ce6f742773de4d90edaf5cd8dca8dc9
@Zane Helton Zane Helton authored on 29 Jun 2025
Showing 2 changed files
View
src/api/routes/webhooks/#webhook_id/#token/github.ts
View
src/api/routes/webhooks/#webhook_id/#token/index.ts