alter controller for any untappd api problems

This commit is contained in:
Tommy Parnell
2015-07-25 15:03:03 -04:00
parent 61cddf9ee2
commit f46d91da3b
2 changed files with 4 additions and 0 deletions

1
.gitignore vendored
View File

@@ -4,3 +4,4 @@ public/out
public/dist
public/components
.idea/
.settings/

View File

@@ -26,6 +26,9 @@ router.get('/', function (req, res, next) {
untappd.setClientSecret(process.env.untappdsecret);
untappd.userFeed(function(err,obj){
if((err != undefined && err != null) || obj.response.checkins.items.length < 1){
return res.render('index', {});
}
var validCheckin = null;
obj.response.checkins.items.forEach(function(checkin){
console.log(checkin);