Fix res_body variable typo in Auth class

This commit is contained in:
Brian Cain 2015-09-15 11:24:17 -07:00
parent 9e4e7b3dab
commit 2ea08f95a5

View file

@ -8,12 +8,12 @@ class Auth
resp = conn.post "/token" resp = conn.post "/token"
resp_body = JSON.parse(resp.body) res_body = JSON.parse(resp.body)
if resp_body["ok"] if res_body["ok"]
return resp_body["token"] return res_body["token"]
else else
STDERR.puts "There was a problem with your request:" STDERR.puts "There was a problem with your request:"
puts resp_body puts res_body
exit 1 exit 1
end end
end end
@ -28,11 +28,11 @@ class Auth
response = conn.delete "/token/#{token}" response = conn.delete "/token/#{token}"
res_body = JSON.parse(response) res_body = JSON.parse(response)
if resp_body["ok"] if res_body["ok"]
puts resp_body puts res_body
else else
STDERR.puts "There was a problem with your request:" STDERR.puts "There was a problem with your request:"
puts resp_body puts res_body
exit 1 exit 1
end end
end end
@ -48,11 +48,11 @@ class Auth
response = conn.get "/token/#{token}" response = conn.get "/token/#{token}"
res_body = JSON.parse(response.body) res_body = JSON.parse(response.body)
if resp_body["ok"] if res_body["ok"]
puts resp_body puts res_body
else else
STDERR.puts "There was a problem with your request:" STDERR.puts "There was a problem with your request:"
puts resp_body puts res_body
exit 1 exit 1
end end
end end