refactor(scraper): rename /ui/audio*, /ui/chapter-text routes to /api/ namespace

This commit is contained in:
Admin
2026-03-02 22:01:52 +05:00
parent 59b1cfab1d
commit cb90771248
2 changed files with 11 additions and 11 deletions

View File

@@ -40,8 +40,8 @@ export const POST: RequestHandler = async ({ params, request }) => {
const data = (await scraperRes.json()) as { url: string; filename: string };
// Rewrite the proxy URL from the scraper's /ui/audio-proxy/... to our own
// /api/audio/[slug]/[n]?voice=...&speed=... so the browser never calls the scraper directly.
// The scraper returns a proxy URL pointing to /api/audio-proxy/... — we rewrite
// it to our own /api/audio/[slug]/[n]?... so the browser never calls the scraper directly.
const voice = body.voice ?? '';
const speed = body.speed ?? 1.0;
const qs = new URLSearchParams();