dfsfds
This commit is contained in:
parent
258787b061
commit
a7ca8c34ee
2 changed files with 11 additions and 22 deletions
|
@ -138,6 +138,17 @@ def front_all(v):
|
|||
|
||||
if v and v.hidevotedon: posts = [x for x in posts if not hasattr(x, 'voted') or not x.voted]
|
||||
|
||||
if v.agendaposter_expires_utc and v.agendaposter_expires_utc < time.time():
|
||||
v.agendaposter_expires_utc = 0
|
||||
v.agendaposter = False
|
||||
g.db.add(v)
|
||||
send_notification(v.id, "Your agendaposter theme has expired!")
|
||||
|
||||
if v.flairchanged and v.flairchanged < time.time():
|
||||
v.flairchanged = None
|
||||
g.db.add(v)
|
||||
send_notification(v.id, "Your flair lock has expired. You can now change your flair!")
|
||||
|
||||
if request.headers.get("Authorization"): return {"data": [x.json for x in posts], "next_exists": next_exists}
|
||||
else: return render_template("home.html", v=v, listing=posts, next_exists=next_exists, sort=sort, t=t, page=page)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue