mirror of
https://github.com/TangentFoxy/itchy.git
synced 2024-11-14 10:14:22 +00:00
fix #7 new API endpoint
This commit is contained in:
parent
e2df6b75dd
commit
55327f6fd2
@ -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)
|
||||||
|
@ -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}"
|
||||||
|
Loading…
Reference in New Issue
Block a user