fixed typoes/errors w new table system

This commit is contained in:
Paul Liverman III 2018-03-25 13:51:59 -07:00
parent ad2c1c586b
commit 2789379c1d
2 changed files with 7 additions and 7 deletions

View File

@ -26,7 +26,7 @@ check = function(data)
result.body, result.status = http.request(tostring(data.proxy) .. "/get/https://itch.io/api/1/x/wharf/latest?target=" .. tostring(data.target) .. "&channel_name=" .. tostring(data.channel))
end
if not (result.body) then
result.message = "socket.http.request error: " .. tostring(status)
result.message = "socket.http.request error: " .. tostring(result.status)
send:push(result)
return false
end
@ -35,15 +35,15 @@ check = function(data)
if data.version then
result.latest = result.version == data.version
end
if status ~= 200 and (not version) then
result.message = "unknown, error getting latest version: HTTP " .. tostring(status) .. ", trying again in " .. tostring(exponential_backoff) .. " seconds"
if result.status ~= 200 and (not result.version) then
result.message = "unknown, error getting latest version: HTTP " .. tostring(result.status) .. ", trying again in " .. tostring(exponential_backoff) .. " seconds"
send:push(result)
timer.sleep(exponential_backoff)
exponential_backoff = exponential_backoff * 2
_continue_0 = true
break
elseif latest ~= nil then
if latest then
elseif result.latest ~= nil then
if result.latest then
result.message = tostring(result.version) .. ", you have the latest version"
else
result.message = tostring(result.version) .. ", there is a newer version available!"

View File

@ -34,8 +34,8 @@ check = (data) ->
timer.sleep exponential_backoff
exponential_backoff *= 2
continue
elseif latest != nil
if latest
elseif result.latest != nil
if result.latest
result.message = "#{result.version}, you have the latest version"
else
result.message = "#{result.version}, there is a newer version available!"