From 2c40fa4e0e77350f42fc722dc24a8f12dbdef651 Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Thu, 8 Feb 2018 16:23:10 -0500 Subject: [PATCH] Restart and update both work with restify, so put them behind POST endpoints to prevent absentminded browser requests from breaking sequences. They will need to be added to the UI in a reasonable way. --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index fe074b2..91d7956 100644 --- a/index.js +++ b/index.js @@ -40,8 +40,8 @@ function createServer () { app.get( '/status', rStatus) app.post('/reset', rReset) - app.get('/update', rUpdate) - app.get('/restart', rRestart) + app.post('/update', rUpdate) + app.post('/restart', rRestart) app.listen(PORT, () => { @@ -351,7 +351,7 @@ function rUpdate (req, res, next) { if (err) { log.error(err) } - log.info(`update`, { git : stdio }) + log.info(`/update`, { git : stdio }) res.send({ success : true, action : 'update', output : stdio }) res.end() next()