randydev commited on
Commit
fcce034
·
verified ·
1 Parent(s): 483ec3a

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -9,6 +9,7 @@ LOGS = logging.getLogger("[akenox]")
9
  logger.setLevel(logging.DEBUG)
10
 
11
  fast_app = js.get_app()
 
12
 
13
  client = js.create_pyrogram(
14
  name="fastapi-bot",
@@ -29,7 +30,6 @@ async def hello():
29
  @fast_app.get("/api/send")
30
  async def send_message():
31
  response_json = await client.send_message("@xpushz", "hello world!")
32
- convert_str = str(response_json)
33
- return {"success": convert_str}
34
 
35
  run_fast(build=fast_app, port=7860)
 
9
  logger.setLevel(logging.DEBUG)
10
 
11
  fast_app = js.get_app()
12
+ js.add_cors_middleware()
13
 
14
  client = js.create_pyrogram(
15
  name="fastapi-bot",
 
30
  @fast_app.get("/api/send")
31
  async def send_message():
32
  response_json = await client.send_message("@xpushz", "hello world!")
33
+ return response_json
 
34
 
35
  run_fast(build=fast_app, port=7860)