forked from rDrama/rDrama
remove error codes from redirect()
parent
d9b0b6084d
commit
57f029040d
|
@ -366,7 +366,7 @@ def filters(v:User):
|
||||||
filters=request.values.get("filters")[:1000].strip()
|
filters=request.values.get("filters")[:1000].strip()
|
||||||
|
|
||||||
if filters == v.custom_filter_list:
|
if filters == v.custom_filter_list:
|
||||||
return redirect("/settings/advanced?error=You didn't change anything!"), 400
|
return redirect("/settings/advanced?error=You didn't change anything!")
|
||||||
|
|
||||||
v.custom_filter_list=filters
|
v.custom_filter_list=filters
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
|
|
|
@ -335,12 +335,12 @@ def create_sub2(v):
|
||||||
name = name.strip().lower()
|
name = name.strip().lower()
|
||||||
|
|
||||||
if not valid_sub_regex.fullmatch(name):
|
if not valid_sub_regex.fullmatch(name):
|
||||||
return redirect(f"/create_hole?error=Name does not match the required format!"), 400
|
return redirect(f"/create_hole?error=Name does not match the required format!")
|
||||||
|
|
||||||
sub = get_sub_by_name(name, graceful=True)
|
sub = get_sub_by_name(name, graceful=True)
|
||||||
if not sub:
|
if not sub:
|
||||||
if not v.charge_account('coins', HOLE_COST):
|
if not v.charge_account('coins', HOLE_COST):
|
||||||
return redirect(f"/create_hole?error=You don't have enough coins!"), 403
|
return redirect(f"/create_hole?error=You don't have enough coins!")
|
||||||
|
|
||||||
g.db.add(v)
|
g.db.add(v)
|
||||||
if v.shadowbanned: abort(500)
|
if v.shadowbanned: abort(500)
|
||||||
|
|
Loading…
Reference in New Issue