(req: Request)
| 51 | // Browsers send an explicit `text/html` accept, curl sends `*/*`. Listing json |
| 52 | // first means the wildcard falls back to json while a browser still gets html. |
| 53 | function wantsHtml(req: Request) { |
| 54 | return req.accepts(['json', 'html']) === 'html'; |
| 55 | } |
| 56 | |
| 57 | function renderHtml(jobs: { type: string; url: string }[], message?: string) { |
| 58 | const links = jobs |