X-Git-Url: https://jasonwoof.com/gitweb/?p=af-coffee.git;a=blobdiff_plain;f=api.coffee;h=156e91c1c313ca28691c5ece8dfd9f110cac82ba;hp=318531f6656966a5ff925a1696997eb751c889ba;hb=36afa8a844f8dc9fc50bf6ee4da3fc55e900d9b1;hpb=f4eb811f6b6194f889c676fa7fd327fd1f50789f diff --git a/api.coffee b/api.coffee index 318531f..156e91c 100644 --- a/api.coffee +++ b/api.coffee @@ -142,8 +142,8 @@ json_request = (method, path, data, token, callback) -> data = JSON.stringify data request method, path, 'application/json', data, token, (err, response) -> return callback err if err - return callback() if response is ' ' - return callback() if response is '' + return callback null, '' if response is ' ' + return callback null, '' if response is '' try callback null, JSON.parse(response) catch error