Remove references to holes

This commit is contained in:
iro84657 2022-05-09 11:01:11 -04:00
parent 5500fc6e8d
commit 35fdbd2e2e
7 changed files with 9 additions and 36 deletions

View file

@ -15,4 +15,4 @@ from .votes import *
from .feeds import *
from .awards import *
from .giphy import *
from .subs import *
# from .subs import *

View file

@ -57,8 +57,8 @@ def pusher_thread(interests, c, username):
@app.get("/comment/<cid>")
@app.get("/post/<pid>/<anything>/<cid>")
@app.get("/h/<sub>/comment/<cid>")
@app.get("/h/<sub>/post/<pid>/<anything>/<cid>")
# @app.get("/h/<sub>/comment/<cid>")
# @app.get("/h/<sub>/post/<pid>/<anything>/<cid>")
@auth_desired
def post_pid_comment_cid(cid, pid=None, anything=None, v=None, sub=None):

View file

@ -159,8 +159,8 @@ def notifications(v):
@app.get("/")
@app.get("/catalog")
@app.get("/h/<sub>")
@app.get("/s/<sub>")
# @app.get("/h/<sub>")
# @app.get("/s/<sub>")
@limiter.limit("3/second;30/minute;1000/hour;5000/day")
@auth_desired
def front_all(v, sub=None, subdomain=None):

View file

@ -95,7 +95,7 @@ def publish(pid, v):
return redirect(post.permalink)
@app.get("/submit")
@app.get("/h/<sub>/submit")
# @app.get("/h/<sub>/submit")
@auth_required
def submit_get(v, sub=None):
if sub: sub = g.db.query(Sub.name).filter_by(name=sub.strip().lower()).one_or_none()
@ -108,8 +108,8 @@ def submit_get(v, sub=None):
@app.get("/post/<pid>")
@app.get("/post/<pid>/<anything>")
@app.get("/h/<sub>/post/<pid>")
@app.get("/h/<sub>/post/<pid>/<anything>")
# @app.get("/h/<sub>/post/<pid>")
# @app.get("/h/<sub>/post/<pid>/<anything>")
@auth_desired
def post_id(pid, anything=None, v=None, sub=None):
@ -758,7 +758,7 @@ def api_is_repost():
else: return {'permalink': ''}
@app.post("/submit")
@app.post("/h/<sub>/submit")
# @app.post("/h/<sub>/submit")
@limiter.limit("1/second;2/minute;10/hour;50/day")
@auth_required
def submit_post(v, sub=None):

View file

@ -38,15 +38,6 @@ def api_flag_post(pid, v):
_note=f'"{post.flair}"'
)
g.db.add(ma)
elif reason.startswith('/h/') and v.admin_level > 2:
post.sub = reason[3:]
g.db.add(post)
ma=ModAction(
kind="move_hole",
user_id=v.id,
target_submission_id=post.id,
)
g.db.add(ma)
else:
flag = Flag(post_id=post.id, user_id=v.id, reason=reason)
g.db.add(flag)

View file

@ -20,11 +20,6 @@
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/exilees">HOLE EXILEES</a>
<a class="btn btn-primary btn-block mb-3" href="/h/{{sub.name}}/blockers">HOLE BLOCKERS</a>
{% else %}
{% if v and v.admin_level > 2 %}
<a class="btn btn-primary btn-block mb-3" href="/create_sub">CREATE HOLE</a>
{% endif %}
<a class="btn btn-primary btn-block mb-3" href="/holes">BROWSE HOLES</a>
<div class="rules mt-4">
<h4>What is this place?</h4>

View file

@ -74,19 +74,6 @@
<input type="hidden" name="formkey" value="{{v.formkey}}">
<label class='mt-4' for="title">Hole</label>
<div class="input-group mb2">
<input list="subs" autocomplete="off" id='sub' class="form-control" form="submitform" name="sub" oninput="savetext()" {% if sub %}value="{{sub.name}}"{% endif %} placeholder="Optional">
<datalist id="subs">
{% for s in SUBS %}
<option value="{{s}}"></option>
{% endfor %}
</datalist>
</div>
<div class="mt-1" style="font-size: min(3.5vw,14px)"><span style="color:#ffcccb ">WARNING</span>: Selecting a hole considerably reduces the number of people who will see your post. Don't select a hole unless that's what you want.</div>
<label class='mt-4' for="title">Post Title</label>