diff --git a/src/main.ts b/src/main.ts index 1133286..d1d3d4a 100644 --- a/src/main.ts +++ b/src/main.ts @@ -70,6 +70,17 @@ app.get('/:id', async (req, res) => { } }); +app.get('/:id/log', async (req, res) => { + const logFile = logForRequest(req.params.id); + if (!logFile) { + res.sendStatus(410); + return; + } + + res.send(readFileSync(logFile)); +}); + +// deprecated app.get('/log/:id', async (req, res) => { const logFile = logForRequest(req.params.id); if (!logFile) {