From 3052fbd46e7cb731c27d6dfb7fca3f0bcc3fbbff Mon Sep 17 00:00:00 2001 From: Alan Shaw Date: Sun, 5 Oct 2014 12:21:28 +0100 Subject: [PATCH] Serve insecure badge for david-dm.org @nodesecurity integration --- server.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 66e9acf8030ac..6aa6dad515afa 100644 --- a/server.js +++ b/server.js @@ -1214,7 +1214,10 @@ cache(function(data, match, sendBadge) { try { var data = JSON.parse(buffer); var status = data.status; - if (status === 'notsouptodate') { + if (status === 'insecure') { + badgeData.colorscheme = 'red'; + status = 'insecure'; + } else if (status === 'notsouptodate') { badgeData.colorscheme = 'yellow'; status = 'up-to-date'; } else if (status === 'outofdate') {