mirror of
https://git.nadeko.net/Fijxu/invidious.git
synced 2025-12-26 17:41:17 +00:00
add missing current_companion to post companion route
Some checks failed
Stale issue handler / stale (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.17.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.18.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
Some checks failed
Stale issue handler / stale (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile.arm64, ARM64, ubuntu-24.04-arm, linux/arm64/v8, -arm64) (push) Has been cancelled
Build and release container directly from master / release (docker/Dockerfile, AMD64, ubuntu-latest, linux/amd64, ) (push) Has been cancelled
Invidious CI / build - crystal: 1.14.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.15.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.16.3, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.17.1, stable: true (push) Has been cancelled
Invidious CI / build - crystal: 1.18.2, stable: true (push) Has been cancelled
Invidious CI / build - crystal: nightly, stable: false (push) Has been cancelled
Invidious CI / Test AMD64 Docker build (push) Has been cancelled
Invidious CI / Test ARM64 Docker build (push) Has been cancelled
Invidious CI / lint (push) Has been cancelled
This commit is contained in:
@@ -20,13 +20,15 @@ module Invidious::Routes::Companion
|
|||||||
|
|
||||||
# POST /companion
|
# POST /companion
|
||||||
def self.post_companion(env)
|
def self.post_companion(env)
|
||||||
|
current_companion = env.get("current_companion").as(Int32)
|
||||||
|
|
||||||
url = env.request.path
|
url = env.request.path
|
||||||
if env.request.query
|
if env.request.query
|
||||||
url += "?#{env.request.query}"
|
url += "?#{env.request.query}"
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
COMPANION_POOL.client do |wrapper|
|
COMPANION_POOL[current_companion].client do |wrapper|
|
||||||
wrapper.client.post(url, env.request.headers, env.request.body) do |resp|
|
wrapper.client.post(url, env.request.headers, env.request.body) do |resp|
|
||||||
return self.proxy_companion(env, resp)
|
return self.proxy_companion(env, resp)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user