tldraw/apps/huppy/pages/api/dev/redeliver.ts
Steve Ruiz d7002057d7
unbrivate, dot com in (#2475)
This PR moves the tldraw.com app into the public repo.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]

---------

Co-authored-by: Dan Groshev <git@dgroshev.com>
Co-authored-by: alex <alex@dytry.ch>
2024-01-16 14:38:05 +00:00

17 lines
540 B
TypeScript

import { assert } from '@tldraw/utils'
import { NextApiRequest, NextApiResponse } from 'next'
import { getAppOctokit } from '../../../src/octokit'
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
assert(process.env.NODE_ENV !== 'production')
assert(req.method === 'POST')
const deliveryId = req.body.id as number
assert(typeof deliveryId === 'number')
const gh = getAppOctokit()
await gh.octokit.rest.apps.redeliverWebhookDelivery({
delivery_id: deliveryId,
})
return res.json({ ok: true })
}