:id/log instead of /log/:id

This commit is contained in:
Thomas E Lackey 2024-02-19 16:53:32 -06:00
parent ecc21cb935
commit 1bbfbf399f

View File

@ -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) {