Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions apps/web/src/app/api/video/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ export async function POST(request: Request) {
const controller = new AbortController();
const timeout = setTimeout(() => controller.abort(), 15_000);

const response = await fetch(`${BACKEND_URL}/api/v1/transcript-action`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ video_url: url, language: 'en' }),
signal: controller.signal,
}).finally(() => clearTimeout(timeout));
let response: Response;
try {
response = await fetch(`${BACKEND_URL}/api/v1/transcript-action`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ video_url: url, language: 'en' }),
signal: controller.signal,
});
} finally {
clearTimeout(timeout);
}

if (response.ok) {
const result = await response.json();
Expand Down
264 changes: 0 additions & 264 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading