mirror of
https://github.com/langgenius/webapp-conversation.git
synced 2025-12-22 22:56:39 +08:00
add missing code
This commit is contained in:
21
app/api/passport/route.ts
Normal file
21
app/api/passport/route.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import { type NextRequest } from 'next/server'
|
||||
import { client } from '@/app/api/utils/common'
|
||||
import { API_KEY, API_URL, APP_ID } from '@/config'
|
||||
|
||||
// import { commonClient } from 'dify-client'
|
||||
import axios from "axios";
|
||||
|
||||
export async function GET(request: NextRequest) {
|
||||
const headers = {
|
||||
Authorization: `Bearer ${API_KEY}`,
|
||||
"Content-Type": "application/json",
|
||||
'X-App-Code': APP_ID
|
||||
};
|
||||
const res = await axios({
|
||||
url: 'https://api.dify.ai/v1/passport',
|
||||
headers,
|
||||
responseType: "json",
|
||||
})
|
||||
console.log(res)
|
||||
return new Response(res.data)
|
||||
}
|
||||
Reference in New Issue
Block a user