diff --git a/main.py b/main.py index 81855c6..0a47794 100644 --- a/main.py +++ b/main.py @@ -158,6 +158,15 @@ async def root(): return RedirectResponse(url="/{hash}".format(hash=random_hash)) +@app.get("/{order}/{delay}") +async def order_delay(order: str, delay: int): + """Redirect to random file with order and delay""" + random_hash = _get_random_hash() + return RedirectResponse( + url="/{order}/{delay}/{hash}".format(order=order, delay=delay, hash=random_hash) + ) + + def _get_navigation_data(file_hash: str): """Get navigation data for a file hash""" keys = list(file_mapping.keys())