MatteoScript commited on
Commit
bda88a2
1 Parent(s): 7465a11

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +6 -0
main.py CHANGED
@@ -26,6 +26,10 @@ async def lifespan(_: FastAPI):
26
  # Initialize FastAPI app (similar to Flask)
27
  app = FastAPI(lifespan=lifespan)
28
 
 
 
 
 
29
  @app.post("/")
30
  async def process_update(request: Request):
31
  print('entrato')
@@ -35,6 +39,8 @@ async def process_update(request: Request):
35
  await ptb.process_update(update)
36
  return Response(status_code=HTTPStatus.OK)
37
 
 
 
38
  # Example handler
39
  async def start(update, _: ContextTypes.DEFAULT_TYPE):
40
  """Send a message when the command /start is issued."""
 
26
  # Initialize FastAPI app (similar to Flask)
27
  app = FastAPI(lifespan=lifespan)
28
 
29
+ @app.get("/")
30
+ def read_general():
31
+ return {"response": "Started"}
32
+
33
  @app.post("/")
34
  async def process_update(request: Request):
35
  print('entrato')
 
39
  await ptb.process_update(update)
40
  return Response(status_code=HTTPStatus.OK)
41
 
42
+
43
+
44
  # Example handler
45
  async def start(update, _: ContextTypes.DEFAULT_TYPE):
46
  """Send a message when the command /start is issued."""