Update main.py
Browse files
main.py
CHANGED
|
@@ -61,13 +61,14 @@ async def genshin_daily(data: CookieRequest):
|
|
| 61 |
|
| 62 |
return FileResponse(res["file"], media_type="image/png")
|
| 63 |
|
| 64 |
-
@app.
|
| 65 |
-
async def genshin_daily():
|
| 66 |
-
res = await gs_app.run_daily_and_capture()
|
|
|
|
| 67 |
if not res["ok"]:
|
| 68 |
raise HTTPException(status_code=500, detail=res["error"])
|
| 69 |
|
| 70 |
-
return
|
| 71 |
|
| 72 |
@app.get("/")
|
| 73 |
def home():
|
|
|
|
| 61 |
|
| 62 |
return FileResponse(res["file"], media_type="image/png")
|
| 63 |
|
| 64 |
+
@app.post("/api/v1/genshin/daily")
|
| 65 |
+
async def genshin_daily(data: CookieRequest):
|
| 66 |
+
res = await gs_app.run_daily_and_capture(data.cookie)
|
| 67 |
+
|
| 68 |
if not res["ok"]:
|
| 69 |
raise HTTPException(status_code=500, detail=res["error"])
|
| 70 |
|
| 71 |
+
return res
|
| 72 |
|
| 73 |
@app.get("/")
|
| 74 |
def home():
|