File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ def create_app_module(file_path: Path) -> str:
8181 module_name = f"codegen_app_{ file_path .stem } "
8282 module_code = f"""
8383from { file_path .stem } import app
84- app = app
84+ app = app.app # Get the FastAPI instance from the CodegenApp
8585"""
8686 module_path = file_path .parent / f"{ module_name } .py"
8787 module_path .write_text (module_code )
Original file line number Diff line number Diff line change @@ -161,15 +161,18 @@ def _setup_routes(self):
161161 async def _root ():
162162 return await self .root ()
163163
164- @self .app .post ("/{org}/{repo}/slack/events" )
164+ # @self.app.post("/{org}/{repo}/slack/events")
165+ @self .app .post ("/slack/events" )
165166 async def _handle_slack_event (request : Request ):
166167 return await self .handle_slack_event (request )
167168
168- @self .app .post ("/{org}/{repo}/github/events" )
169+ # @self.app.post("/{org}/{repo}/github/events")
170+ @self .app .post ("/github/events" )
169171 async def _handle_github_event (request : Request ):
170172 return await self .handle_github_event (request )
171173
172- @self .app .post ("/{org}/{repo}/linear/events" )
174+ # @self.app.post("/{org}/{repo}/linear/events")
175+ @self .app .post ("/linear/events" )
173176 async def handle_linear_event (request : Request ):
174177 return await self .handle_linear_event (request )
175178
You can’t perform that action at this time.
0 commit comments