File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
apps/dojo/src/app/api/copilotkit/[integrationId] Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -46,18 +46,13 @@ async function buildAppForIntegration(integrationId: string) {
4646 return app ;
4747}
4848
49- export const GET = async ( request : Request ) => {
49+ const requestHandler = async ( request : Request ) => {
5050 const integrationId = extractIntegrationIdFromUrl ( request . url ) ;
5151 if ( ! integrationId ) return new Response ( "Integration not found" , { status : 404 } ) ;
5252 const app = await buildAppForIntegration ( integrationId ) ;
5353 if ( ! app ) return new Response ( "Integration not found" , { status : 404 } ) ;
5454 return handle ( app ) ( request ) ;
5555} ;
5656
57- export const POST = async ( request : Request ) => {
58- const integrationId = extractIntegrationIdFromUrl ( request . url ) ;
59- if ( ! integrationId ) return new Response ( "Integration not found" , { status : 404 } ) ;
60- const app = await buildAppForIntegration ( integrationId ) ;
61- if ( ! app ) return new Response ( "Integration not found" , { status : 404 } ) ;
62- return handle ( app ) ( request ) ;
63- } ;
57+ export const GET = requestHandler ;
58+ export const POST = requestHandler ;
You can’t perform that action at this time.
0 commit comments