asdasdjnklasdjknsadjkndasjkhlashjilasdjhkasd
This commit is contained in:
parent
396339d358
commit
2e1a851fe5
3 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,7 @@ module Providers
|
|||
# bttv = Channel(JSON::Any).new
|
||||
# dankchat = Channel(JSON::Any).new
|
||||
# ffz = Channel(JSON::Any).new
|
||||
info = [Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new]
|
||||
info = [Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new, Channel(JSON::Any).new]
|
||||
# Compile with -Dpreview_mt for multithreading
|
||||
spawn { info[0].send(Providers::Chatterino.get_badges) }
|
||||
spawn { info[1].send(Providers::BTTV.get_badges) }
|
||||
|
|
|
@ -2,7 +2,7 @@ module Providers::PurpleTV
|
|||
extend self
|
||||
|
||||
def get_badges
|
||||
res = HTTP::Client.get("", headers: HEADERS)
|
||||
res = HTTP::Client.get("https://api.nopbreak.ru/orange/donations", headers: HEADERS)
|
||||
JSON.parse(res.body)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -25,6 +25,7 @@ HEADERS = HTTP::Headers{"User-Agent" => "Vanity-Tester-Backend/0.1.0"}
|
|||
before_get do |env|
|
||||
# Every response is a JSON
|
||||
env.response.content_type = "application/json"
|
||||
env.response.headers["Access-Control-Allow-Origin"] = "*"
|
||||
end
|
||||
|
||||
get "/badges" do |env|
|
||||
|
|
Loading…
Reference in a new issue