aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/routes/links_routes.py2
-rw-r--r--app/util/log.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/app/routes/links_routes.py b/app/routes/links_routes.py
index 1599c82..f56ebfc 100644
--- a/app/routes/links_routes.py
+++ b/app/routes/links_routes.py
@@ -51,6 +51,8 @@ async def create_link(
link=link_path,
owner=current_user.id,
redirect_link=url.url,
+ expire_date=datetime.datetime.utcnow()
+ + datetime.timedelta(days=30),
)
db.add(new_link)
db.commit()
diff --git a/app/util/log.py b/app/util/log.py
index 1d21445..58a56f9 100644
--- a/app/util/log.py
+++ b/app/util/log.py
@@ -68,6 +68,7 @@ def log(link, ip, user_agent):
new_log = Log(
owner=owner,
link=link,
+ timestamp=datetime.datetime.utcnow(),
ip=ip,
location=location,
browser=browser,