Merge pull request #133 from karpoveech/issues/132
Implemented feature request issue #132
This commit is contained in:
		
						commit
						c34a881f25
					
				@ -10,15 +10,6 @@ export async function POST(req: NextRequest) {
 | 
			
		||||
    try {
 | 
			
		||||
      const body = await req.json();
 | 
			
		||||
      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(
 | 
			
		||||
        prompt, tags, title,
 | 
			
		||||
        Boolean(make_instrumental),
 | 
			
		||||
 | 
			
		||||
@ -10,16 +10,6 @@ export async function POST(req: NextRequest) {
 | 
			
		||||
      const body = await req.json();
 | 
			
		||||
      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(
 | 
			
		||||
        prompt,
 | 
			
		||||
        Boolean(make_instrumental),
 | 
			
		||||
 | 
			
		||||
@ -10,16 +10,6 @@ export async function POST(req: NextRequest) {
 | 
			
		||||
      const body = await req.json();
 | 
			
		||||
      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);
 | 
			
		||||
 | 
			
		||||
      return new NextResponse(JSON.stringify(lyrics), {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user