Hana Celeste commited on
Update main.py
Browse files
main.py
CHANGED
|
@@ -22,12 +22,14 @@ async def lifespan(app: FastAPI):
|
|
| 22 |
await fetcher.start()
|
| 23 |
await discord_app.start()
|
| 24 |
await byps.start()
|
|
|
|
| 25 |
yield
|
| 26 |
await fetcher.stop()
|
| 27 |
await akasa.stop()
|
| 28 |
await enka.stop()
|
| 29 |
await discord_app.stop()
|
| 30 |
await byps.stop()
|
|
|
|
| 31 |
|
| 32 |
app = FastAPI(lifespan=lifespan)
|
| 33 |
|
|
@@ -56,8 +58,8 @@ async def api_bypass(url: str):
|
|
| 56 |
return await byps.fetch(url)
|
| 57 |
|
| 58 |
@app.get("/genshin-codes")
|
| 59 |
-
async def genshin_codes(
|
| 60 |
-
return await gscode.fetch_codes(
|
| 61 |
|
| 62 |
@app.get("/")
|
| 63 |
def home():
|
|
|
|
| 22 |
await fetcher.start()
|
| 23 |
await discord_app.start()
|
| 24 |
await byps.start()
|
| 25 |
+
await gscode.start()
|
| 26 |
yield
|
| 27 |
await fetcher.stop()
|
| 28 |
await akasa.stop()
|
| 29 |
await enka.stop()
|
| 30 |
await discord_app.stop()
|
| 31 |
await byps.stop()
|
| 32 |
+
await gscode.stop()
|
| 33 |
|
| 34 |
app = FastAPI(lifespan=lifespan)
|
| 35 |
|
|
|
|
| 58 |
return await byps.fetch(url)
|
| 59 |
|
| 60 |
@app.get("/genshin-codes")
|
| 61 |
+
async def genshin_codes():
|
| 62 |
+
return await gscode.fetch_codes()
|
| 63 |
|
| 64 |
@app.get("/")
|
| 65 |
def home():
|