mirror of
https://github.com/puppetlabs/vmfloaty.git
synced 2026-01-26 05:28:40 -05:00
Fix res_body variable typo in Auth class
This commit is contained in:
parent
9e4e7b3dab
commit
2ea08f95a5
1 changed files with 10 additions and 10 deletions
|
|
@ -8,12 +8,12 @@ class Auth
|
|||
|
||||
resp = conn.post "/token"
|
||||
|
||||
resp_body = JSON.parse(resp.body)
|
||||
if resp_body["ok"]
|
||||
return resp_body["token"]
|
||||
res_body = JSON.parse(resp.body)
|
||||
if res_body["ok"]
|
||||
return res_body["token"]
|
||||
else
|
||||
STDERR.puts "There was a problem with your request:"
|
||||
puts resp_body
|
||||
puts res_body
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
|
@ -28,11 +28,11 @@ class Auth
|
|||
|
||||
response = conn.delete "/token/#{token}"
|
||||
res_body = JSON.parse(response)
|
||||
if resp_body["ok"]
|
||||
puts resp_body
|
||||
if res_body["ok"]
|
||||
puts res_body
|
||||
else
|
||||
STDERR.puts "There was a problem with your request:"
|
||||
puts resp_body
|
||||
puts res_body
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
|
@ -48,11 +48,11 @@ class Auth
|
|||
response = conn.get "/token/#{token}"
|
||||
res_body = JSON.parse(response.body)
|
||||
|
||||
if resp_body["ok"]
|
||||
puts resp_body
|
||||
if res_body["ok"]
|
||||
puts res_body
|
||||
else
|
||||
STDERR.puts "There was a problem with your request:"
|
||||
puts resp_body
|
||||
puts res_body
|
||||
exit 1
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue