Skip to content
Snippets Groups Projects
Commit 9ecfbd5e authored by Julian Rother's avatar Julian Rother
Browse files

Add 'source' field in log table

parent c9bc9da2
No related branches found
No related tags found
No related merge requests found
......@@ -128,6 +128,7 @@ CREATE TABLE IF NOT EXISTS `log` (
`ip` varchar(64),
`id` varchar(64),
`time` datetime NOT NULL,
`source` varchar(8),
`object` varchar(10),
`obj_id` INTEGER,
`path` varchar(255) NOT NULL
......
......@@ -552,7 +552,7 @@ def auth(): # For use with nginx auth_request
password = auth.password
if checkperm(perms, username=username, password=password):
try:
modify('INSERT INTO log VALUES (?, ?, ?, "video", ?, ?)', ip, cookie, datetime.now(), perms[0]['vid'], url)
modify('INSERT INTO log (ip, id, `time`, object, obj_id, path) VALUES (?, ?, ?, "video", ?, ?)', ip, cookie, datetime.now(), perms[0]['vid'], url)
except:
pass
r = make_response('OK', 200)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment