Update main.py
Browse files
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 |
-
|
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)
|