Addressed the same issue as described in #132
This commit is contained in:
		
							parent
							
								
									b4860a23dc
								
							
						
					
					
						commit
						5048d4d142
					
				@ -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),
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user