(req: Request)
| 41 | } |
| 42 | |
| 43 | function buildJobs(req: Request) { |
| 44 | const baseUrl = `${req.protocol}://${req.get('host')}`; |
| 45 | return CRON_TYPES.map((type) => ({ |
| 46 | type, |
| 47 | url: `${baseUrl}/debug/cron/${type}`, |
| 48 | })); |
| 49 | } |
| 50 | |
| 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. |
no test coverage detected