mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-08 17:32:27 +08:00
fix: build error on local
This commit is contained in:
@ -4,8 +4,12 @@ import { client, getInfo, setSession } from '@/app/api/utils/common'
|
|||||||
|
|
||||||
export async function GET(request: NextRequest) {
|
export async function GET(request: NextRequest) {
|
||||||
const { sessionId, user } = getInfo(request)
|
const { sessionId, user } = getInfo(request)
|
||||||
|
try {
|
||||||
const { data }: any = await client.getConversations(user)
|
const { data }: any = await client.getConversations(user)
|
||||||
return NextResponse.json(data, {
|
return NextResponse.json(data, {
|
||||||
headers: setSession(sessionId),
|
headers: setSession(sessionId),
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json([]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,8 +4,12 @@ import { client, getInfo, setSession } from '@/app/api/utils/common'
|
|||||||
|
|
||||||
export async function GET(request: NextRequest) {
|
export async function GET(request: NextRequest) {
|
||||||
const { sessionId, user } = getInfo(request)
|
const { sessionId, user } = getInfo(request)
|
||||||
|
try {
|
||||||
const { data } = await client.getApplicationParameters(user)
|
const { data } = await client.getApplicationParameters(user)
|
||||||
return NextResponse.json(data as object, {
|
return NextResponse.json(data as object, {
|
||||||
headers: setSession(sessionId),
|
headers: setSession(sessionId),
|
||||||
})
|
})
|
||||||
|
} catch (error) {
|
||||||
|
return NextResponse.json([]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -28,7 +28,7 @@
|
|||||||
"copy-to-clipboard": "^3.3.3",
|
"copy-to-clipboard": "^3.3.3",
|
||||||
"dify-client": "2.0.0",
|
"dify-client": "2.0.0",
|
||||||
"eslint": "8.36.0",
|
"eslint": "8.36.0",
|
||||||
"eslint-config-next": "13.2.4",
|
"eslint-config-next": "13.4.0",
|
||||||
"eventsource-parser": "^1.0.0",
|
"eventsource-parser": "^1.0.0",
|
||||||
"husky": "^8.0.3",
|
"husky": "^8.0.3",
|
||||||
"i18next": "^22.4.13",
|
"i18next": "^22.4.13",
|
||||||
@ -37,7 +37,7 @@
|
|||||||
"js-cookie": "^3.0.1",
|
"js-cookie": "^3.0.1",
|
||||||
"katex": "^0.16.7",
|
"katex": "^0.16.7",
|
||||||
"negotiator": "^0.6.3",
|
"negotiator": "^0.6.3",
|
||||||
"next": "13.2.4",
|
"next": "13.4.0",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-dom": "18.2.0",
|
"react-dom": "18.2.0",
|
||||||
"react-error-boundary": "^4.0.2",
|
"react-error-boundary": "^4.0.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user