Commit c2cfd84fe454c914520641b013129a8751715ff9

Authored by Adhidarma Hadiwinoto
1 parent 9b5f21d3ee
Exists in master

pageLog

Showing 1 changed file with 2 additions and 2 deletions Side-by-side Diff

lib/apiserver/routers/smstools.js
... ... @@ -27,7 +27,7 @@ async function pageRestart(req, res) {
27 27 res.json(await smstoolsUtil.restart());
28 28 }
29 29  
30   -function pageSmsdLog(req, res) {
  30 +function pageLog(req, res) {
31 31 const maxLines = (Number(req.query.max) || 200);
32 32 const keyword = req.query.keyword && req.query.keyword.trim() && escapeQuotes(req.query.keyword.trim(), '\'"&|*<>[];$');
33 33 const cmd = req.query.keyword ? `tail -n ${maxLines * 50} | grep ${keyword} | tail -n ${maxLines} | tac`
... ... @@ -45,4 +45,4 @@ function pageSmsdLog(req, res) {
45 45 router.get('/status', pageStatus);
46 46 router.get('/status/raw', pageStatusRaw);
47 47 router.get('/restart', pageRestart);
48   -router.get('/smsd-log', pageSmsdLog);
  48 +router.get('/log', pageLog);