Ufoptg commited on
Commit
2bcec52
1 Parent(s): 63b700d

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -1
main.py CHANGED
@@ -398,7 +398,9 @@ async def get_torrent_info(url):
398
 
399
  @app.get("/UFoP/yts", response_model=List[MovieInfo])
400
  async def get_movie_info(name: str, api_key: str = Header(...)):
401
- validate_api_key(api_key) # Validate API key here
 
 
402
  results = []
403
  try:
404
  for page in range(1, 2):
 
398
 
399
  @app.get("/UFoP/yts", response_model=List[MovieInfo])
400
  async def get_movie_info(name: str, api_key: str = Header(...)):
401
+ if api_key != "666":
402
+ raise HTTPException(status_code=403, detail="Invalid API key")
403
+
404
  results = []
405
  try:
406
  for page in range(1, 2):