remove pull route (issue works fine already)
This commit is contained in:
parent
81e08a08e3
commit
d745f1027c
1 changed files with 0 additions and 22 deletions
22
server.js
22
server.js
|
@ -57,26 +57,4 @@ app.get('/:owner/:repo/issue/:num', async function (req, res) {
|
|||
res.send(await render(html))
|
||||
})
|
||||
|
||||
app.get('/:owner/:repo/pull/:num', async function (req, res) {
|
||||
const issueResp = await fetch(
|
||||
`https://git.gay/api/v1/repos/${encodeURIComponent(
|
||||
req.params.owner
|
||||
)}/${encodeURIComponent(req.params.repo)}/pulls/${encodeURIComponent(
|
||||
req.params.num
|
||||
)}`
|
||||
)
|
||||
const issue = await issueResp.json()
|
||||
const html = await eta.renderAsync('issue', {
|
||||
issue,
|
||||
debug
|
||||
})
|
||||
if (debug) {
|
||||
res.send(await renderHtml(html))
|
||||
return
|
||||
}
|
||||
res.type('png')
|
||||
res.set('Content-Disposition', 'inline')
|
||||
res.send(await render(html))
|
||||
})
|
||||
|
||||
app.listen(8085)
|
||||
|
|
Loading…
Reference in a new issue