:id/log instead of /log/:id
This commit is contained in:
parent
ecc21cb935
commit
1bbfbf399f
11
src/main.ts
11
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) => {
|
app.get('/log/:id', async (req, res) => {
|
||||||
const logFile = logForRequest(req.params.id);
|
const logFile = logForRequest(req.params.id);
|
||||||
if (!logFile) {
|
if (!logFile) {
|
||||||
|
Loading…
Reference in New Issue
Block a user