Skip to content

Commit

Permalink
Merge branch 'master' of github.com:samr28/hubot-agenda
Browse files Browse the repository at this point in the history
  • Loading branch information
samr28 committed Nov 24, 2017
2 parents 0172d85 + 30ea080 commit f97e286
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions scripts/agenda.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,10 @@ function update(robot, id, value) {
console.log(new Error(`Value '${id}' is out of bounds of ${getAgendaLength(robot)}`));
return new Error(`There are only ${getAgendaLength(robot)} items. But you tried to update item #${id-1}.`);
}
updateBrainData(robot, id, value);
return `Updated #${id-1} successfully.`;
let oldData = getBrainData(robot)[id];
oldData.value = value;
updateBrainData(robot, id, oldData);
return `Updated #${id+1} successfully.`;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion web.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ http.createServer(function (req, res) {
displayPage(res, cb);
}
]);
}).listen(8080);
}).listen(81);

function buildHtml(cb) {
var header = '';
Expand Down

0 comments on commit f97e286

Please sign in to comment.