Spaces:
Sleeping
Sleeping
Update app/api/ask-ai/route.ts
Browse files- app/api/ask-ai/route.ts +2 -2
app/api/ask-ai/route.ts
CHANGED
|
@@ -34,7 +34,7 @@ export async function POST(request: NextRequest) {
|
|
| 34 |
const userToken = request.cookies.get(MY_TOKEN_KEY())?.value;
|
| 35 |
|
| 36 |
const body = await request.json();
|
| 37 |
-
const { prompt,
|
| 38 |
|
| 39 |
if (!model || (!prompt && !redesignMarkdown)) {
|
| 40 |
return NextResponse.json(
|
|
@@ -162,7 +162,7 @@ export async function PUT(request: NextRequest) {
|
|
| 162 |
const userToken = request.cookies.get(MY_TOKEN_KEY())?.value;
|
| 163 |
|
| 164 |
const body = await request.json();
|
| 165 |
-
const { prompt, previousPrompts,
|
| 166 |
|
| 167 |
if (!prompt || pages.length === 0) {
|
| 168 |
return NextResponse.json(
|
|
|
|
| 34 |
const userToken = request.cookies.get(MY_TOKEN_KEY())?.value;
|
| 35 |
|
| 36 |
const body = await request.json();
|
| 37 |
+
const { prompt, model, redesignMarkdown, previousPrompts, pages } = body;
|
| 38 |
|
| 39 |
if (!model || (!prompt && !redesignMarkdown)) {
|
| 40 |
return NextResponse.json(
|
|
|
|
| 162 |
const userToken = request.cookies.get(MY_TOKEN_KEY())?.value;
|
| 163 |
|
| 164 |
const body = await request.json();
|
| 165 |
+
const { prompt, previousPrompts, selectedElementHtml, model, pages, files } = body;
|
| 166 |
|
| 167 |
if (!prompt || pages.length === 0) {
|
| 168 |
return NextResponse.json(
|