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:
81
81
module_name = f"codegen_app_{ file_path .stem } "
82
82
module_code = f"""
83
83
from { file_path .stem } import app
84
- app = app
84
+ app = app.app # Get the FastAPI instance from the CodegenApp
85
85
"""
86
86
module_path = file_path .parent / f"{ module_name } .py"
87
87
module_path .write_text (module_code )
Original file line number Diff line number Diff line change @@ -161,15 +161,18 @@ def _setup_routes(self):
161
161
async def _root ():
162
162
return await self .root ()
163
163
164
- @self .app .post ("/{org}/{repo}/slack/events" )
164
+ # @self.app.post("/{org}/{repo}/slack/events")
165
+ @self .app .post ("/slack/events" )
165
166
async def _handle_slack_event (request : Request ):
166
167
return await self .handle_slack_event (request )
167
168
168
- @self .app .post ("/{org}/{repo}/github/events" )
169
+ # @self.app.post("/{org}/{repo}/github/events")
170
+ @self .app .post ("/github/events" )
169
171
async def _handle_github_event (request : Request ):
170
172
return await self .handle_github_event (request )
171
173
172
- @self .app .post ("/{org}/{repo}/linear/events" )
174
+ # @self.app.post("/{org}/{repo}/linear/events")
175
+ @self .app .post ("/linear/events" )
173
176
async def handle_linear_event (request : Request ):
174
177
return await self .handle_linear_event (request )
175
178
You can’t perform that action at this time.
0 commit comments