[enh] There should be a route to view a single log
This commit is contained in:
parent
ca8dd606b7
commit
724539d88e
5 changed files with 159 additions and 132 deletions
|
|
@ -68,6 +68,24 @@ const routes = {
|
|||
res.status(400);
|
||||
res.end("error");
|
||||
});
|
||||
} ,
|
||||
log: (req, res) => {
|
||||
|
||||
const id= req.params.id;
|
||||
var log = client.get({
|
||||
index: 'changelog',
|
||||
id: id
|
||||
}).then( (results, err) => {
|
||||
res.render('index', {
|
||||
title: 'changelog',
|
||||
error: err,
|
||||
data: JSON.stringify( results),
|
||||
authorizationToken: process.env.AUTH_TOKEN
|
||||
});
|
||||
}, (e) => {
|
||||
res.status(400);
|
||||
res.end("error");
|
||||
});
|
||||
}
|
||||
};
|
||||
module.exports = routes;
|
||||
module.exports = routes;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue