diff --git a/saddle.py b/saddle.py index 640303c..8e95db1 100644 --- a/saddle.py +++ b/saddle.py @@ -83,13 +83,10 @@ async def index(request): return web.json_response(urls) -@routes.get('/gallery/{user_id}', name='gallery') +@routes.get('/gallery', name='gallery') async def gallery(request): """A user's gallery page.""" - try: - user_id = int(request.match_info['user_id']) - except ValueError: - raise web.HTTPNotFound + user_id = int(request.cookies.get('userid')) async with request.app['pool'].acquire() as conn: uploads = await conn.fetch( diff --git a/templates/header.html b/templates/header.html index addf678..7639c3c 100644 --- a/templates/header.html +++ b/templates/header.html @@ -4,5 +4,5 @@