Celeskry commited on
Commit
34230c8
·
verified ·
1 Parent(s): c7e9d08

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +5 -4
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.get("/api/v1/genshin/daily")
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 FileResponse(res["file"], media_type="image/png")
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():