diff options
author | Parker <contact@pkrm.dev> | 2024-11-16 01:49:30 -0600 |
---|---|---|
committer | Parker <contact@pkrm.dev> | 2024-11-16 01:49:30 -0600 |
commit | 56dbcdc7050c3c6726173cf3edbfc1fdd551a71c (patch) | |
tree | effd76d8fff1d1d293888088110731dc0aeb0694 | |
parent | 4d626d423c2e8158205fb525f24f3dc2338a5b1f (diff) |
Make the /{link} route actually work
-rw-r--r-- | api/routes/log_routes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/api/routes/log_routes.py b/api/routes/log_routes.py index 5875e3b..438fbf6 100644 --- a/api/routes/log_routes.py +++ b/api/routes/log_routes.py @@ -47,9 +47,10 @@ async def get_logs_for_link( Get all of the logs associated with a specific link - check to make sure the requester is the owner """ + link = link.upper() link = ( db.query(Link) - .filter(Link.owner == current_user.id, Link.short == link) + .filter(Link.owner == current_user.id, Link.link == link) .first() ) if not link: @@ -58,7 +59,7 @@ async def get_logs_for_link( ) logs = ( db.query(Log) - .filter(Log.link_id == link.id) + .filter(Log.link == link.link) .order_by(Log.timestamp.desc()) .all() ) |