Allow search and other pages for logged out users
This commit is contained in:
parent
f36a0b88e2
commit
d354b0713d
4 changed files with 31 additions and 46 deletions
|
@ -467,8 +467,7 @@ def changeloglist(v=None, sort="new", page=1, t="all", site=None):
|
|||
|
||||
|
||||
@app.get("/random_post")
|
||||
@auth_required
|
||||
def random_post(v):
|
||||
def random_post():
|
||||
|
||||
p = g.db.query(Submission.id).filter(Submission.deleted_utc == 0, Submission.is_banned == False, Submission.private == False).order_by(func.random()).first()
|
||||
|
||||
|
@ -479,8 +478,7 @@ def random_post(v):
|
|||
|
||||
|
||||
@app.get("/random_user")
|
||||
@auth_required
|
||||
def random_user(v):
|
||||
def random_user():
|
||||
u = g.db.query(User.username).order_by(func.random()).first()
|
||||
|
||||
if u: u = u[0]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue