Fix userpages redux
This commit is contained in:
parent
b9e205324a
commit
51c892c606
1 changed files with 5 additions and 5 deletions
|
@ -697,7 +697,7 @@ def u_username(username, v=None):
|
||||||
|
|
||||||
if u.unban_utc:
|
if u.unban_utc:
|
||||||
if request.headers.get("Authorization"): {"data": [x.json for x in listing]}
|
if request.headers.get("Authorization"): {"data": [x.json for x in listing]}
|
||||||
return render_template("userpage.html",
|
return render_template("userpage_submissions.html",
|
||||||
unban=u.unban_string,
|
unban=u.unban_string,
|
||||||
u=u,
|
u=u,
|
||||||
v=v,
|
v=v,
|
||||||
|
@ -711,7 +711,7 @@ def u_username(username, v=None):
|
||||||
|
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return {"data": [x.json for x in listing]}
|
if request.headers.get("Authorization"): return {"data": [x.json for x in listing]}
|
||||||
return render_template("userpage.html",
|
return render_template("userpage_submissions.html",
|
||||||
u=u,
|
u=u,
|
||||||
v=v,
|
v=v,
|
||||||
listing=listing,
|
listing=listing,
|
||||||
|
@ -727,8 +727,8 @@ def u_username(username, v=None):
|
||||||
def u_username_comments(username, v=None):
|
def u_username_comments(username, v=None):
|
||||||
user = get_user(username, v=v, include_blocks=True)
|
user = get_user(username, v=v, include_blocks=True)
|
||||||
|
|
||||||
if username != u.username:
|
if username != user.username:
|
||||||
return redirect(SITE_FULL + request.full_path.replace(username, u.username)[:-1])
|
return redirect(SITE_FULL + request.full_path.replace(username, user.username)[:-1])
|
||||||
u = user
|
u = user
|
||||||
|
|
||||||
if u.reserved:
|
if u.reserved:
|
||||||
|
@ -776,7 +776,7 @@ def u_username_comments(username, v=None):
|
||||||
is_following = (v and user.has_follower(v))
|
is_following = (v and user.has_follower(v))
|
||||||
|
|
||||||
if request.headers.get("Authorization"): return {"data": [c.json for c in listing]}
|
if request.headers.get("Authorization"): return {"data": [c.json for c in listing]}
|
||||||
return render_template("userpage_comments.html", u=user, v=v, listing=listing, page=page, sort=sort, t=t,next_exists=next_exists, is_following=is_following, standalone=True)
|
return render_template("userpage.html", u=user, v=v, listing=listing, page=page, sort=sort, t=t,next_exists=next_exists, is_following=is_following, standalone=True)
|
||||||
|
|
||||||
|
|
||||||
@app.get("/@<username>/info")
|
@app.get("/@<username>/info")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue