Skip to content

Commit

Permalink
399
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbam committed Sep 2, 2019
1 parent 4411e3e commit 205864a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ app.get('/times/:league', function (req, res) {
}
};
request(options, function (err, response, body) {
if (response.statusCode < 200 || response.statusCode > 299) {
if (response.statusCode < 200 || response.statusCode > 399) {
return res.status(response.statusCode).json({});
}
return res.status(200).json(JSON.parse(body));
Expand All @@ -63,7 +63,7 @@ app.post('/times', function (req, res) {
request.post(options, function (err, response, body) {
console.log('times body res : ', body);

if (response.statusCode < 200 || response.statusCode > 299) {
if (response.statusCode < 200 || response.statusCode > 399) {
return res.status(response.statusCode).json({});
}
return res.status(200).json(JSON.parse(body));
Expand Down

0 comments on commit 205864a

Please sign in to comment.