fix #7 new API endpoint

This commit is contained in:
Paul Liverman III 2018-05-25 14:14:21 -07:00
parent e2df6b75dd
commit 55327f6fd2
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ check = function(data)
send:push(result) send:push(result)
return false return false
end end
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)) result.body, result.status = http.request(tostring(data.proxy) .. "/get/https://api.itch.io/wharf/latest?target=" .. tostring(data.target) .. "&channel_name=" .. tostring(data.channel))
end end
if not (result.body) then if not (result.body) then
result.message = "socket.http.request error: " .. tostring(result.status) result.message = "socket.http.request error: " .. tostring(result.status)

View File

@ -16,7 +16,7 @@ check = (data) ->
result.message = "'target' or 'url' must be defined!" result.message = "'target' or 'url' must be defined!"
send\push result send\push result
return false return false
result.body, result.status = http.request "#{data.proxy}/get/https://itch.io/api/1/x/wharf/latest?target=#{data.target}&channel_name=#{data.channel}" result.body, result.status = http.request "#{data.proxy}/get/https://api.itch.io/wharf/latest?target=#{data.target}&channel_name=#{data.channel}"
unless result.body unless result.body
result.message = "socket.http.request error: #{result.status}" result.message = "socket.http.request error: #{result.status}"