Push dev work to master #2

Merged
sixteenmillimeter merged 416 commits from dev into master 2018-07-19 15:29:02 +00:00
2 changed files with 3 additions and 5 deletions
Showing only changes of commit 45e427caf9 - Show all commits

View File

@ -168,15 +168,12 @@ web.reset = function () {
} }
fetch('/reset', opts) fetch('/reset', opts)
.then(web.useJson) .then(web.useJson)
.then(web.resetSuccess) .then(setState)
.catch(err => { .catch(err => {
console.error('Error posting to /reset'); console.error('Error posting to /reset');
console.error(err); console.error(err);
}) })
}; };
web.resetSuccess = function (res) {
console.dir(res)
}
web.restart = function () { web.restart = function () {
const opts = { const opts = {
method : 'POST', method : 'POST',

View File

@ -340,7 +340,8 @@ function rReset (req, res, next) {
log.info(`/reset`, {time : +new Date()}) log.info(`/reset`, {time : +new Date()})
intval.reset() intval.reset()
setTimeout(() => { setTimeout(() => {
res.send(intval._state) const obj = intval.status()
res.send(obj)
return next() return next()
}, 10) }, 10)
} }