This commit is contained in:
hazycora 2023-08-02 17:19:26 -05:00
parent a72e440222
commit c0faaf51ff
No known key found for this signature in database
GPG key ID: 215AF1F81F86940E

View file

@ -33,11 +33,10 @@ app.get('/', function (req, res) {
}) })
app.get('/:owner/:repo', async function (req, res) { app.get('/:owner/:repo', async function (req, res) {
let repo = await ( const repoResp = await fetch(
await fetch( `https://git.gay/api/v1/repos/${req.params.owner}/${req.params.repo}`
`https://git.gay/api/v1/repos/${req.params.owner}/${req.params.repo}` )
) const repo = await repoResp.json()
).json()
let infoHtml = ` let infoHtml = `
<p style="font-size: 36px; color: #9A8FA7;">${escape( <p style="font-size: 36px; color: #9A8FA7;">${escape(
repo.owner.full_name repo.owner.full_name
@ -52,7 +51,7 @@ app.get('/:owner/:repo', async function (req, res) {
repo.description repo.description
)}</p>` )}</p>`
let img = await html2png( const img = await html2png(
`<div class="main"> `<div class="main">
<div class="contents"> <div class="contents">
<div class="info"> <div class="info">