Remove special cases based on request.host
This commit is contained in:
parent
4341e2d980
commit
193ff08a3d
12 changed files with 18 additions and 88 deletions
|
@ -223,12 +223,10 @@ def remove_mod(v, sub):
|
|||
@app.get("/create_sub")
|
||||
@is_not_permabanned
|
||||
def create_sub(v):
|
||||
if request.host == 'rdrama.net': cost = 0
|
||||
else:
|
||||
num = v.subs_created + 1
|
||||
for a in v.alts:
|
||||
num += a.subs_created
|
||||
cost = num * 100
|
||||
num = v.subs_created + 1
|
||||
for a in v.alts:
|
||||
num += a.subs_created
|
||||
cost = num * 100
|
||||
|
||||
return render_template("sub/create_sub.html", v=v, cost=cost)
|
||||
|
||||
|
@ -240,12 +238,10 @@ def create_sub2(v):
|
|||
if not name: abort(400)
|
||||
name = name.strip().lower()
|
||||
|
||||
if request.host == 'rdrama.net': cost = 0
|
||||
else:
|
||||
num = v.subs_created + 1
|
||||
for a in v.alts:
|
||||
num += a.subs_created
|
||||
cost = num * 100
|
||||
num = v.subs_created + 1
|
||||
for a in v.alts:
|
||||
num += a.subs_created
|
||||
cost = num * 100
|
||||
|
||||
if not valid_sub_regex.fullmatch(name):
|
||||
return render_template("sub/create_sub.html", v=v, cost=cost, error="Sub name not allowed."), 400
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue