Allow logged in users to "hit" their own paste
Increments the view counter in an edge case where the logged in user is viewing their own paste.
This commit is contained in:
parent
8825e000c2
commit
4c65fc3692
|
@ -853,6 +853,11 @@ function read(req)
|
|||
--the page, since it'll have an edit button on it.
|
||||
assert(err == sql.ROW)
|
||||
local title, storytext, tauthor, isanon, authorname, views = unpack(stmnt_read:get_values())
|
||||
stmnt_update_views:bind_names{
|
||||
id = id
|
||||
}
|
||||
print("update:",do_sql(stmnt_update_views))
|
||||
stmnt_update_views:reset()
|
||||
storytext = zlib.decompress(storytext)
|
||||
stmnt_read:reset()
|
||||
if tauthor == authorid then
|
||||
|
|
Loading…
Reference in New Issue