remove error codes from redirect()

pull/102/head
Aevann 2023-01-27 13:28:50 +02:00
parent d9b0b6084d
commit 57f029040d
2 changed files with 3 additions and 3 deletions

View File

@ -366,7 +366,7 @@ def filters(v:User):
filters=request.values.get("filters")[:1000].strip()
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
g.db.add(v)

View File

@ -335,12 +335,12 @@ def create_sub2(v):
name = name.strip().lower()
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)
if not sub:
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)
if v.shadowbanned: abort(500)