Make the /{link} route actually work
This commit is contained in:
parent
4d626d423c
commit
56dbcdc705
@ -47,9 +47,10 @@ async def get_logs_for_link(
|
|||||||
Get all of the logs associated with a specific link
|
Get all of the logs associated with a specific link
|
||||||
- check to make sure the requester is the owner
|
- check to make sure the requester is the owner
|
||||||
"""
|
"""
|
||||||
|
link = link.upper()
|
||||||
link = (
|
link = (
|
||||||
db.query(Link)
|
db.query(Link)
|
||||||
.filter(Link.owner == current_user.id, Link.short == link)
|
.filter(Link.owner == current_user.id, Link.link == link)
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
if not link:
|
if not link:
|
||||||
@ -58,7 +59,7 @@ async def get_logs_for_link(
|
|||||||
)
|
)
|
||||||
logs = (
|
logs = (
|
||||||
db.query(Log)
|
db.query(Log)
|
||||||
.filter(Log.link_id == link.id)
|
.filter(Log.link == link.link)
|
||||||
.order_by(Log.timestamp.desc())
|
.order_by(Log.timestamp.desc())
|
||||||
.all()
|
.all()
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user