d7002057d7
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>
17 lines
531 B
TypeScript
17 lines
531 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 === 'GET')
|
|
const id = req.query.id
|
|
assert(typeof id === 'string')
|
|
|
|
const gh = getAppOctokit()
|
|
const { data: delivery } = await gh.octokit.rest.apps.getWebhookDelivery({
|
|
delivery_id: Number(id),
|
|
})
|
|
|
|
return res.json(delivery)
|
|
}
|