Add an easier way to access order/delay

This commit is contained in:
Timothy Farrell 2026-03-12 08:59:07 +00:00
parent af5b58a8ad
commit 4eb9ff1188

View File

@ -158,6 +158,15 @@ async def root():
return RedirectResponse(url="/{hash}".format(hash=random_hash)) 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): def _get_navigation_data(file_hash: str):
"""Get navigation data for a file hash""" """Get navigation data for a file hash"""
keys = list(file_mapping.keys()) keys = list(file_mapping.keys())