mirror of
https://github.com/TangentFoxy/itchy.git
synced 2024-11-14 10:14:22 +00:00
fixed typoes/errors w new table system
This commit is contained in:
parent
ad2c1c586b
commit
2789379c1d
10
check.lua
10
check.lua
@ -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!"
|
||||
|
@ -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!"
|
||||
|
Loading…
Reference in New Issue
Block a user