Skip to content

Commit

Permalink
Merge pull request #2 from glenster75/master
Browse files Browse the repository at this point in the history
Update server.js
  • Loading branch information
geerlingguy committed May 18, 2021
2 parents bb8826a + 6140250 commit 4cb7c5e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@ app.get('/config', function(req, res){

// Allow incrementing or decrementing the step via /up or /down.
app.get('/up', function(req, res){
step++;
if (step < config.task_list_items.length){
step++;
}
res.send('New value: ' + step);
});
app.get('/down', function(req, res){
step--;
if (step > 1){
step--;
}
res.send('New value: ' + step);
});

Expand Down

0 comments on commit 4cb7c5e

Please sign in to comment.