语音转文本接口,bgm路径修复
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
import { NextRequest, NextResponse } from 'next/server';
|
||||
import { prisma } from '@/lib/prisma';
|
||||
import type { FeedItem, FeedResponse } from '@/app/types/feed';
|
||||
import { getFileUrl } from '@/lib/minio';
|
||||
import { transcriptAweme } from '.';
|
||||
|
||||
// Contract
|
||||
// Inputs: search params { before?: ISOString, limit?: number }
|
||||
// Output: { items: FeedItem[], nextCursor: ISOString | null }
|
||||
|
||||
export async function GET(req: NextRequest) {
|
||||
const { searchParams } = new URL(req.url)
|
||||
const awemeId = searchParams.get('awemeId');
|
||||
if (!awemeId) {
|
||||
return NextResponse.json({ error: "Missing awemeId parameter" }, { status: 400 });
|
||||
}
|
||||
const script = await transcriptAweme(awemeId);
|
||||
return NextResponse.json(script);
|
||||
}
|
||||
Reference in New Issue
Block a user