remove unnecessary function

pull/20/head
justcool393 2022-11-18 06:44:21 -06:00
parent fc5d524e87
commit f1f2393da1
6 changed files with 6 additions and 6 deletions

View File

@ -30,7 +30,7 @@ WORDLE_COLOR_MAPPINGS = {-1: "🟥", 0: "🟨", 1: "🟩"}
@app.get("/h/<sub>/comment/<cid>")
@app.get("/h/<sub>/post/<pid>/<anything>/<cid>")
@auth_desired_with_logingate
def post_pid_comment_cid(cid, pid=None, anything=None, v=LoggedOutUser(), sub=None):
def post_pid_comment_cid(v, cid, pid=None, anything=None, sub=None):
comment = get_comment(cid, v=v)
if not v.can_see(comment): abort(404)
if comment.post and comment.post.club and not v.can_see_content(comment): abort(403)

View File

@ -8,7 +8,7 @@ from files.__main__ import app
@app.get("/giphy")
@app.get("/giphy<path>")
@auth_required
def giphy(v=None, path=None):
def giphy(v, path=None):
searchTerm = request.values.get("searchTerm", "").strip()
limit = 48

View File

@ -57,7 +57,7 @@ def inject_constants():
"KOFI_TOKEN":KOFI_TOKEN, "KOFI_LINK":KOFI_LINK,
"approved_embed_hosts":approved_embed_hosts,
"site_settings":get_settings(), "EMAIL":EMAIL, "calc_users":calc_users,
"max": max, "min": min, "user_can_see":LoggedOutUser.can_see,
"max": max, "min": min,
"TELEGRAM_LINK":TELEGRAM_LINK, "EMAIL_REGEX_PATTERN":EMAIL_REGEX_PATTERN,
"CONTENT_SECURITY_POLICY_DEFAULT":CONTENT_SECURITY_POLICY_DEFAULT,
"CONTENT_SECURITY_POLICY_HOME":CONTENT_SECURITY_POLICY_HOME,

View File

@ -135,7 +135,7 @@ def submit_get(v, sub=None):
@app.get("/h/<sub>/post/<pid>")
@app.get("/h/<sub>/post/<pid>/<anything>")
@auth_desired_with_logingate
def post_id(pid, anything=None, v=LoggedOutUser(), sub=None):
def post_id(v, pid, anything=None, sub=None):
post = get_post(pid, v=v)
if not v.can_see(post): abort(403)
if not v.can_see_content(post) and post.club: abort(403)

View File

@ -739,7 +739,7 @@
{% endif %}
{% endmacro %}
{% for comment in comments if user_can_see(v, comment) %}
{% for comment in comments if v.can_see(comment) %}
{{single_comment(comment)}}
{% endfor %}

View File

@ -20,7 +20,7 @@
{% include "popover.html" %}
{% for p in listing if user_can_see(v, p) %}
{% for p in listing if v.can_see(p) %}
{% set ups=p.upvotes %}
{% set downs=p.downvotes %}