Data already serialised

This commit is contained in:
Greg Bowler 2015-01-07 16:58:04 +00:00
parent 25202a8a22
commit 54de33b70c

View File

@ -2801,13 +2801,12 @@ cache(function(data, match, sendBadge, request) {
var badgeData = getBadgeData('CircleCI', data);
request(apiUrl, {json:true}, function(err, res, buffer) {
request(apiUrl, {json:true}, function(err, res, data) {
if (err != null) {
badgeData.text[1] = 'inaccessible';
sendBadge(format, badgeData);
}
try {
var data = JSON.parse(buffer);
var status = data[0].status;
switch(status) {
case 'success':