Celeskry commited on
Commit
60cc0d2
·
verified ·
1 Parent(s): 4f62a23

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -127,10 +127,11 @@ async def hentai_newest(
127
  @app.get("/api/v1/hentai/random")
128
  async def hentai_random(
129
  apikey: Optional[str] = Query(None),
 
130
  x_api_key: Optional[str] = Header(None, alias="X-API-Key")
131
  ):
132
  key = x_api_key or apikey
133
- return await ht_random_app.get_random(key, API_KEY)
134
 
135
  @app.get("/")
136
  def home():
 
127
  @app.get("/api/v1/hentai/random")
128
  async def hentai_random(
129
  apikey: Optional[str] = Query(None),
130
+ limit: str = Query("1"), # Thêm dòng này để nhận limit
131
  x_api_key: Optional[str] = Header(None, alias="X-API-Key")
132
  ):
133
  key = x_api_key or apikey
134
+ return await ht_random_app.get_random(key, API_KEY, limit)
135
 
136
  @app.get("/")
137
  def home():