Skip to content

Commit

Permalink
Update server.js
Browse files Browse the repository at this point in the history
  • Loading branch information
glensouza committed May 18, 2021
1 parent bb8826a commit 6140250
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 6140250

Please sign in to comment.