From e944df3d7d431b5bd88c2c235501a355ea1ba6ab Mon Sep 17 00:00:00 2001 From: Parker Date: Tue, 5 Nov 2024 20:36:09 -0600 Subject: Fix auth and organization/standards --- app/util/log.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/util/log.py') diff --git a/app/util/log.py b/app/util/log.py index de60f23..b84c8a0 100644 --- a/app/util/log.py +++ b/app/util/log.py @@ -4,10 +4,10 @@ from ua_parser import user_agent_parser from database import SessionLocal import config -from models import Link, Record +from models import Link, Log """ -Create a new log record whenever a link is visited +Create a new log whenever a link is visited """ @@ -65,8 +65,8 @@ def log(link, ip, user_agent): browser = ua_string["user_agent"]["family"] os = f'{ua_string["os"]["family"]} {ua_string["os"]["major"]}' - # Create the log record and commit it to the database - link_record = Record( + # Create the log and commit it to the database + new_log = Log( owner=owner, link=link, timestamp=timestamp, @@ -77,7 +77,7 @@ def log(link, ip, user_agent): user_agent=user_agent, isp=isp, ) - db.add(link_record) + db.add(new_log) db.commit() db.close() -- cgit v1.2.3-70-g09d2