From 0c1ff373166282c3821dd6077c056e4918e9205a Mon Sep 17 00:00:00 2001 From: Jesse Piascik Date: Thu, 14 Aug 2014 11:00:49 -0500 Subject: [PATCH] Fix show for logged in user --- github.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/github.js b/github.js index 2cdefc37..a338ffbc 100644 --- a/github.js +++ b/github.js @@ -100,8 +100,9 @@ // ------- this.show = function(username, cb) { - var command = username ? "/users/"+username : "/user"; - + var command = "/users"+username; + if (typeof username == 'function') command = "/user", cb = username; + _request("GET", command, null, function(err, res) { cb(err, res); });