summaryrefslogtreecommitdiff
path: root/fbin/db.py
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2017-04-22 14:06:35 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2017-04-22 14:08:09 +0200
commitf5dcf75075c013bbfdf9cdb6716afee777620c73 (patch)
tree26772aa9f5f288bf7fba044b995c1fc28c5a5476 /fbin/db.py
parent8e44431e5b34c2e647c339f332cea32d44797951 (diff)
Added upload API.
Also updated the API (previously help) page.
Diffstat (limited to 'fbin/db.py')
-rw-r--r--fbin/db.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/fbin/db.py b/fbin/db.py
index dfe3b17..5323134 100644
--- a/fbin/db.py
+++ b/fbin/db.py
@@ -1,4 +1,5 @@
from contextlib import contextmanager
+import datetime
import mimetypes
import os
@@ -20,6 +21,7 @@ class User(Base):
id = Column(Integer, primary_key = True)
username = Column(String, unique = True, index = True)
jab_id = Column(String(24), unique = True, index = True)
+ api_key_date = Column(DateTime, default = datetime.datetime.utcnow)
files = relation('File', backref = 'user', order_by = 'File.date.desc()')
def __init__(self, username, jab_id):