asdasdjnklasdjknsadjkndasjkhlashjilasdjhkasd

This commit is contained in:
Fijxu 2024-09-18 13:46:00 -03:00
parent 396339d358
commit 2e1a851fe5
Signed by: Fijxu
GPG key ID: 32C1DDF333EDA6A4
3 changed files with 3 additions and 2 deletions

View file

@ -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) }

View file

@ -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

View file

@ -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|