small restructuring in preparation for something

This commit is contained in:
Laptop
2024-12-23 18:57:32 +02:00
parent 8adb7a8b41
commit 491aa6028c
9 changed files with 148 additions and 125 deletions

View File

@@ -6,6 +6,7 @@ import (
"github.com/gofiber/fiber/v2"
"github.com/maid-zone/soundcloak/lib/cfg"
"github.com/maid-zone/soundcloak/lib/misc"
"github.com/maid-zone/soundcloak/lib/sc"
"github.com/valyala/fasthttp"
)
@@ -65,7 +66,7 @@ func Load(r fiber.Router) {
return err
}
//return c.Send(resp.Body())
pr := cfg.AcquireProxyReader()
pr := misc.AcquireProxyReader()
pr.Reader = resp.BodyStream()
pr.Resp = resp
return c.SendStream(pr)
@@ -103,7 +104,7 @@ func Load(r fiber.Router) {
return err
}
pr := cfg.AcquireProxyReader()
pr := misc.AcquireProxyReader()
pr.Reader = resp.BodyStream()
pr.Resp = resp
return c.SendStream(pr)