forked from rDrama/rDrama
make logged_out-cels count towards post view counts again
parent
1d1f3d1a3b
commit
dfe5fdcea1
|
@ -95,6 +95,9 @@ def post_id(pid, anything=None, v=None, sub=None):
|
|||
if g.is_api_or_xhr: abort(451, "Must be 18+ to view")
|
||||
return render_template("errors/nsfw.html", v=v)
|
||||
|
||||
p.views += 1
|
||||
g.db.add(p)
|
||||
|
||||
if not v and not request.values.get("sort"):
|
||||
result = cache.get(f'post_{p.id}')
|
||||
if result: return result
|
||||
|
@ -166,9 +169,6 @@ def post_id(pid, anything=None, v=None, sub=None):
|
|||
|
||||
p.replies = list(pinned2.keys()) + comments
|
||||
|
||||
p.views += 1
|
||||
g.db.add(p)
|
||||
|
||||
if v and v.client:
|
||||
return p.json(g.db)
|
||||
|
||||
|
|
Loading…
Reference in New Issue