refactor(scraper): rename /ui/audio*, /ui/chapter-text routes to /api/ namespace
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user