Merge pull request #133 from karpoveech/issues/132

Implemented feature request issue #132
This commit is contained in:
blueeon 2024-07-20 10:36:21 +08:00 committed by GitHub
commit c34a881f25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 29 deletions

View File

@ -10,15 +10,6 @@ export async function POST(req: NextRequest) {
try { try {
const body = await req.json(); const body = await req.json();
const { prompt, tags, title, make_instrumental, model, wait_audio } = body; const { prompt, tags, title, make_instrumental, model, wait_audio } = body;
if (!prompt || !tags || !title) {
return new NextResponse(JSON.stringify({ error: 'Prompt, tags, and title are required' }), {
status: 400,
headers: {
'Content-Type': 'application/json',
...corsHeaders
}
});
}
const audioInfo = await (await sunoApi).custom_generate( const audioInfo = await (await sunoApi).custom_generate(
prompt, tags, title, prompt, tags, title,
Boolean(make_instrumental), Boolean(make_instrumental),

View File

@ -10,16 +10,6 @@ export async function POST(req: NextRequest) {
const body = await req.json(); const body = await req.json();
const { prompt, make_instrumental, model, wait_audio } = body; const { prompt, make_instrumental, model, wait_audio } = body;
if (!prompt) {
return new NextResponse(JSON.stringify({ error: 'Prompt is required' }), {
status: 400,
headers: {
'Content-Type': 'application/json',
...corsHeaders
}
});
}
const audioInfo = await (await sunoApi).generate( const audioInfo = await (await sunoApi).generate(
prompt, prompt,
Boolean(make_instrumental), Boolean(make_instrumental),

View File

@ -10,16 +10,6 @@ export async function POST(req: NextRequest) {
const body = await req.json(); const body = await req.json();
const { prompt } = body; const { prompt } = body;
if (!prompt) {
return new NextResponse(JSON.stringify({ error: 'Prompt is required' }), {
status: 400,
headers: {
'Content-Type': 'application/json',
...corsHeaders
}
});
}
const lyrics = await (await sunoApi).generateLyrics(prompt); const lyrics = await (await sunoApi).generateLyrics(prompt);
return new NextResponse(JSON.stringify(lyrics), { return new NextResponse(JSON.stringify(lyrics), {